示例#1
0
        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);
        }
示例#2
0
 public DBContext()
 {
     this.builder = new DBContextBuilder(this);
 }
示例#3
0
 DBContext()
 {
     builder = new DBContextBuilder(this);
 }