Change id types
This commit is contained in:
@@ -23,6 +23,14 @@ public class UserContext : DbContext
|
||||
{
|
||||
modelBuilder.Entity<User>()
|
||||
.ToTable("User");
|
||||
|
||||
modelBuilder.Entity<User>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id);
|
||||
|
||||
entity.Property(e => e.Id)
|
||||
.HasColumnType("binary(16)"); // **** Map Guid to BINARY(16) ****
|
||||
});
|
||||
modelBuilder.Entity<User>()
|
||||
.Property(u => u.LastLogin).IsRequired(false);
|
||||
modelBuilder.Entity<User>()
|
||||
|
||||
Reference in New Issue
Block a user