public CustomerController(ICustomersRepo repo) { _repo = repo; mapper = new MapperConfiguration(cfg => { cfg.CreateMap <Customer, Customer>().ForMember(x => x.Orders, opt => opt.Ignore()); }).CreateMapper(); }
public CustomersController( ILogger <EmployeesController> logger, ICustomersRepo customersRepo) { _logger = logger; _customersRepo = customersRepo; }
public static void Setup(TestContext testContext) { // Arrange var sampleDocuments = File.ReadAllText(@"..\..\SampleDocuments.json"); var fakeCustomersList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Customer> >(sampleDocuments); var customersRepoMoq = new Mock <ICustomersRepo>(); customersRepoMoq.Setup(x => x.GetCustomers()).Returns(() => fakeCustomersList); customersRepo = customersRepoMoq.Object; }
public BookingsController(IBookingsRepo bookingsRepo, ICustomersRepo customersRepo, ICarsRepo carsRepo) { _bookingsRepo = bookingsRepo; _customersRepo = customersRepo; _carsRepo = carsRepo; }
public CustomersController(ICustomersRepo repo, INOrdersRepo nOrdersRepo) { _repo = repo; _nOrdersRepo = nOrdersRepo; }
public InterestController(ICustomersRepo repository) { _repository = repository; }
public CustomersController(ICustomersRepo customersRepo) { _customersRepo = customersRepo; }