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



            builder.UseSqlServer(ConnectionStringSource.GetConnectionString());

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