public CustomersRepository(IMyDbContext context) { if(context == null) throw new ArgumentNullException("context"); _context = context; }
public CurrentProductListRepositoryRepository(IMyDbContext context) { if(context == null) throw new ArgumentNullException("context"); _context = context; }
public void Setup() { // Arrange _context = new FakeMyDbContext(); _context.Customers.Attach(new Customer { CustomerId = "1", CompanyName = "abc" }); _context.Customers.Attach(new Customer { CustomerId = "2", CompanyName = "def" }); _customersRepository = new CustomersRepository(_context); }