public static void Setup(EntityTypeBuilder <Board> entity) { SetupEntity.Setup(entity); entity.Property(e => e.BoardName).IsRequired(); entity.Property(e => e.BoardKey).IsRequired(); entity.HasIndex(e => e.BoardKey).IsUnique(); }
public static void Setup(EntityTypeBuilder <AnalyticsReport> entity) { SetupEntity.Setup(entity); entity.Property(e => e.Location).IsRequired(); entity.Property(e => e.ThumbPrint).IsRequired(); entity.Property(e => e.Time).IsRequired(); }
public static void Setup(EntityTypeBuilder <File> entity) { SetupEntity.Setup(entity); entity.Property(e => e.Data).IsRequired(); entity.Property(e => e.FileName).IsRequired(); entity.Property(e => e.MimeType).IsRequired(); entity.Property(e => e.ThumbNailJpeg).IsRequired(); entity.HasOne(a => a.Post).WithOne(a => a.File).HasForeignKey <File>(a => a.Id); }
public static void Setup(EntityTypeBuilder <Post> entity) { SetupEntity.Setup(entity); entity.Property(e => e.Comment).IsRequired(); entity.Property(e => e.Name).IsRequired(); entity.Property(e => e.IpAddress).IsRequired(); entity.Property(e => e.ThreadId).IsRequired(); ////entity.Property(e => e.File).SetupAsCharGuid(); }
public static void Setup(EntityTypeBuilder <Thread> entity) { SetupEntity.Setup(entity); entity.Property(e => e.Subject).IsRequired(); entity.Property(e => e.BoardId).IsRequired(); }
public static void Setup(EntityTypeBuilder <BannedImage> entity) { SetupEntity.Setup(entity); entity.Property(e => e.Reason).IsRequired(); entity.Property(e => e.Hash).IsRequired(); }