public override void OnContextCreating(DBContextBuilder contextBuilder) { // Set the options Options.Use <SqlActionProvider>(); // Call base function base.OnContextCreating(contextBuilder); // Set constraints contextBuilder.Model <User>().HasKey(m => m.Id); contextBuilder.Model <User>().IsRequired(m => m.IsEnabled); contextBuilder.Model <User>().IsRequired(m => m.CreatedDateUTC); }
public DBContext() { this.builder = new DBContextBuilder(this); }
DBContext() { builder = new DBContextBuilder(this); }