Albatross.EFCore.CodeGen
10.0.0-54.main
Prefix Reserved
This is a prerelease version of Albatross.EFCore.CodeGen.
This package has a SemVer 2.0.0 package version: 10.0.0-54.main+2e86209.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Albatross.EFCore.CodeGen --version 10.0.0-54.main
NuGet\Install-Package Albatross.EFCore.CodeGen -Version 10.0.0-54.main
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="Albatross.EFCore.CodeGen" Version="10.0.0-54.main"> <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="Albatross.EFCore.CodeGen" Version="10.0.0-54.main" />
<PackageReference Include="Albatross.EFCore.CodeGen"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
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 Albatross.EFCore.CodeGen --version 10.0.0-54.main
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Albatross.EFCore.CodeGen, 10.0.0-54.main"
#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 Albatross.EFCore.CodeGen@10.0.0-54.main
#: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=Albatross.EFCore.CodeGen&version=10.0.0-54.main&prerelease
#tool nuget:?package=Albatross.EFCore.CodeGen&version=10.0.0-54.main&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
A companion code generator used by the Albatross.EFCore library.
Features
Instead of using reflection at runtime, this library will generate entity model builder at compile time using roslyn.
Quick Start
- Create an entity
public class Address { public int Id { get; set; } public string? City { get; set; } } - Crate the entity mapping class for the entity
public class AddressEntityMap : EntityMap<Address> { public override void Map(EntityTypeBuilder<Address> builder) { builder.HasKey(x => x.Id); } } - The code generator will pick up on the
AddressEntityMapclass and generate the following codepublic static ModelBuilder BuildEntityModels(this ModelBuilder modelBuilder) { new Sample.Models.AddressEntityMap().Build(modelBuilder); return modelBuilder; } - To consume the generated code, use it directly in your custom
DbContextclasspublic class SampleDbSession : DbSession { protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.HasDefaultSchema(My.Schema.Sample); modelBuilder.BuildEntityModels(); } } - To turn on the debugging model and see the generated code in visual studio, add the following config change to the project file.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<EmitAlbatrossCodeGenDebugFile>true</EmitAlbatrossCodeGenDebugFile>
</PropertyGroup>
<ItemGroup>
<CompilerVisibleProperty Include="EmitAlbatrossCodeGenDebugFile" />
</ItemGroup>
</Project>
- Rider shows the roslyn generated code at:
Dependencies -> .NET 8.0 -> Source Generators - Sample code can be found here:
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.CSharp (>= 4.10.0)
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 |
|---|---|---|
| 10.0.0-96.main | 20 | 5/19/2026 |
| 10.0.0-46.main | 61 | 1/14/2026 |
| 10.0.0-32.main | 61 | 12/11/2025 |
| 8.1.1 | 141 | 3/20/2025 |
| 8.1.0 | 108 | 3/16/2025 |
| 8.0.1 | 158 | 3/9/2025 |
| 7.5.11 | 241 | 3/5/2025 |