コード例 #1
0
 // CONSTRUCTORS
 public BinaryDbContext(DbContextOptions <BinaryDbContext> options, Interfaces.IDbInitializer dbInitializer)
     : base(options)
 {
     this.dbInitializer = dbInitializer;
     Database.Migrate();
 }
コード例 #2
0
 // CONSTRUCTORS
 /// <summary>
 /// Initializes a new instance of <see cref="DataBaseContext"/> with given options
 /// </summary>
 /// <param name="options">
 /// The option to be used by <see cref="DataBaseContext"/>
 /// </param>
 /// <param name="dbInitializer">
 /// Data base initializer
 /// </param>
 public DataBaseContext(DbContextOptions <DataBaseContext> options, Interfaces.IDbInitializer dbInitializer)
     : base(options)
 {
     this.dbInitializer = dbInitializer;
     Database.EnsureCreated();
 }
コード例 #3
0
 public ApplicationDbContext(DbContextOptions <ApplicationDbContext> options, Interfaces.IDbInitializer dbInitializer)
     : base(options)
 {
     _dbInitializer = dbInitializer;
 }