CA.Blocks.DataAccess.Generators 3.9.273-prerelease

This is a prerelease version of CA.Blocks.DataAccess.Generators.
dotnet add package CA.Blocks.DataAccess.Generators --version 3.9.273-prerelease
                    
NuGet\Install-Package CA.Blocks.DataAccess.Generators -Version 3.9.273-prerelease
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CA.Blocks.DataAccess.Generators" Version="3.9.273-prerelease">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CA.Blocks.DataAccess.Generators" Version="3.9.273-prerelease" />
                    
Directory.Packages.props
<PackageReference Include="CA.Blocks.DataAccess.Generators">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CA.Blocks.DataAccess.Generators --version 3.9.273-prerelease
                    
#r "nuget: CA.Blocks.DataAccess.Generators, 3.9.273-prerelease"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CA.Blocks.DataAccess.Generators@3.9.273-prerelease
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CA.Blocks.DataAccess.Generators&version=3.9.273-prerelease&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=CA.Blocks.DataAccess.Generators&version=3.9.273-prerelease&prerelease
                    
Install as a Cake Tool

NuGet Downloads TargetNuGet version (CA.Blocks.DataAccess.Generators) Build Status

A Package that provides support for AOT Code Generator for CA.Blocks.DataAccess. Add a Package Reference to your project

    <PackageReference Include="CA.Blocks.DataAccess.Generators" Version="3.9.+" OutputItemType="Analyzer" ReferenceOutputAssembly="true" />

Keep your DTO free of attributes, and declare the mapper on a separate context class using the GenerateTranslatorFor attribute (emitted by the generator into your project)

public class SampleCustomer
{
    public int Id { get; init; }
    public required string Name { get; init; }
    public DateTime CreatedDate { get; init; }
}

[GenerateTranslatorFor(typeof(SampleCustomer))]
public static class SampleMappingContext { }

The Compiler will generate and register the class SampleCustomerDbRowTranslator you can then use it to translate SampleCustomer

     var result = await ExecuteAsync(cmd).ToListOf<SampleCustomer>();

The default mapping will handel case insensitive mappings and deal with snake conversions example "customer_id" can map to CustomerId If you are using a database that using Pascal naming for column names you can use disable the snake case mapping to get better performance

[GenerateTranslatorFor(typeof(SampleCustomer), MatchNamesWithUnderscores = false, MatchCaseInsensitive = false))]
public static class SampleMappingContext { }
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.9.273-prerelease 57 10/30/2026
3.9.271-prerelease 62 10/29/2026

v.3.9
- Added AOT support