mirror of
https://github.com/damienbod/AspNetCoreIdentityFido2Mfa.git
synced 2025-10-25 15:19:18 +00:00
Use EF Core Fluent API
This commit is contained in:
@@ -16,6 +16,7 @@ public class ApplicationDbContext : IdentityDbContext
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
builder.Entity<FidoStoredCredential>().HasKey(m => m.Id);
|
||||
builder.Entity<FidoStoredCredential>().Property(b => b.Id).ValueGeneratedOnAdd();
|
||||
|
||||
base.OnModelCreating(builder);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ public class FidoStoredCredential
|
||||
/// <summary>
|
||||
/// Gets or sets the primary key for this user.
|
||||
/// </summary>
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public virtual int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,7 @@ public class ApplicationDbContext : IdentityDbContext
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
{
|
||||
builder.Entity<FidoStoredCredential>().HasKey(m => m.Id);
|
||||
builder.Entity<FidoStoredCredential>().Property(b => b.Id).ValueGeneratedOnAdd();
|
||||
|
||||
base.OnModelCreating(builder);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ public class FidoStoredCredential
|
||||
/// <summary>
|
||||
/// Gets or sets the primary key for this user.
|
||||
/// </summary>
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public virtual int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user