Transit
This commit is contained in:
@@ -8,6 +8,7 @@ public class ContentDbContext(
|
||||
|
||||
public DbSet<Content> Contents => Set<Content>();
|
||||
public DbSet<Creator> Creators => Set<Creator>();
|
||||
public DbSet<Slugs> Slugs => Set<Slugs>();
|
||||
|
||||
protected override void OnModelCreating(
|
||||
ModelBuilder modelBuilder)
|
||||
@@ -36,12 +37,12 @@ public class ContentDbContext(
|
||||
.Property(c => c.ThumbnailUrl);
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
.Entity<Slugs>()
|
||||
.Property(x => x.NormalizedName)
|
||||
.HasComputedColumnSql("LOWER( \"Content\".\"Creators\".\"Name\")", stored: true);
|
||||
.HasComputedColumnSql("LOWER( \"Content\".\"Slugs\".\"Name\")", stored: true);
|
||||
|
||||
modelBuilder
|
||||
.Entity<Creator>()
|
||||
.Entity<Slugs>()
|
||||
.HasIndex(x => x.NormalizedName)
|
||||
.IsUnique();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user