Exemplo n.º 1
0
        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;
        }
Exemplo n.º 3
0
        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);
        }