Architect.Identities.EntityFramework 1.0.0-RC4

EntityFramework extensions for the Architect.Identities package.

Use DbContext-based connections for the Fluid ID generator:

public void ConfigureServices(IServiceCollection services)
 services.AddPooledDbContextFactory<ExampleDbContext>(context => context.UseSqlServer("ConnectionString"));
 services.AddApplicationInstanceIdSource(source => source.UseSqlServerDbContext<ExampleDbContext>());
 services.AddIdGenerator(generator => generator.UseFluid());

Easily configure the column type to use for decimal ID columns:

protected override void OnModelCreating(ModelBuilder modelBuilder)
 modelBuilder.Entity<Order>(entity =>
   entity.Property(o => o.Id)
   entity.HasKey(o => o.Id);
 // Other entities ...

 // For all mapped decimal columns named *Id or *ID
 modelBuilder.StoreDecimalIdsWithCorrectPrecision(dbContext: this);

Or per individual property:

protected override void OnModelCreating(ModelBuilder modelBuilder)
 modelBuilder.Entity<Order>(entity =>
   entity.Property(e => e.Id)
     .StoreWithDecimalIdPrecision(dbContext: this);

The extensions in this package special-case SQLite, which requires special treatment.

This is a prerelease version of Architect.Identities.EntityFramework.
Install-Package Architect.Identities.EntityFramework -Version 1.0.0-RC4
dotnet add package Architect.Identities.EntityFramework --version 1.0.0-RC4
<PackageReference Include="Architect.Identities.EntityFramework" Version="1.0.0-RC4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Architect.Identities.EntityFramework --version 1.0.0-RC4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0-RC4 72 9/23/2020