Beispiel #1
0
        public OrdersDbContext CreateDbContext(string[] args)
        {
            var builder = new DbContextOptionsBuilder <OrdersDbContext>();



            builder.UseSqlServer(ConnectionStringSource.GetConnectionString());

            return(new OrdersDbContext(builder.Options));
        }
Beispiel #2
0
 protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
 {
     optionsBuilder.UseSqlServer(ConnectionStringSource.GetConnectionString());
 }