check constraint entity framework
EF Core 3.0 supports entity.HasCheckConstraint() now. To take Ryan’s example: protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<SomeTable>(entity => entity.HasCheckConstraint(“CK_SomeTable_SomeColumn”, “[SomeColumn] >= X”); }