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



            builder.UseSqlServer(ConnectionStringSource.GetConnectionString());

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