public void Setup() { string connectionString = "Server=WIN10VM2021\\SQLEXPRESS; Database=AdventureWorks2019; Integrated Security=True"; var opts = SqlServerDbContextOptionsExtensions.UseSqlServer(new DbContextOptionsBuilder <AdventureWorksDbContext>(), connectionString).Options; var context = new AdventureWorksDbContext(opts); dbSet = context.Products; }
public void Setup() { var context = new AdventureWorksDbContext(); dbSet = context.Products; //TODO: integration tests with real database }
public EfRepository(AdventureWorksDbContext dbContext) { _dbContext = dbContext; }
public SalesController(AdventureWorksDbContext db) { _db = db; }
public CustomerRepository(AdventureWorksDbContext adventureWorksDbContext) { _adventureWorksDbContext = adventureWorksDbContext; }
public ShipperRepository(AdventureWorksDbContext adventureWorksDbContext) { _adventureWorksDbContext = adventureWorksDbContext; }
public SalesRepository(AdventureWorksDbContext dbContext) : base(dbContext) { }
public ProductsController(AdventureWorksDbContext context, ILogger <ProductsController> logger) { _context = context; _logger = logger; }
public HomeController(AdventureWorksDbContext dbContext) => _dbContext = dbContext;
public ProductRepository(AdventureWorksDbContext dbContext) : base(dbContext) { }
public ProductController(AdventureWorksDbContext context) : base() { _DbContext = context; }
public CustomerController(AdventureWorksDbContext db, ILogger <CustomerController> logger) { _db = db; _logger = logger; }
public EmployeesController(AdventureWorksDbContext adventureWorksDbContext) { _adventureWorksDbContext = adventureWorksDbContext; }
public CustomerService(AdventureWorksDbContext context) { _context = context; }
public EfCoreTests() { _context = new AdventureWorksDbContext(); }
public AdventureWorksRepository(AdventureWorksDbContext adventureWorksDbContext) { this.adventureWorksDbContext = adventureWorksDbContext; }