public OrderServices(ICustomerServices customerServices, IPizzaServices pizzaServices, HungryPizzaContext context, IMapper mapper) { _customerServices = customerServices; _pizzaServices = pizzaServices; _context = context; _mapper = mapper; }
public BaseTestController() { string curDir = Directory.GetCurrentDirectory(); builder = new ConfigurationBuilder() .SetBasePath(curDir) .AddJsonFile("appsettings.json"); optionsBuilder = new DbContextOptionsBuilder <HungryPizzaContext>() .UseSqlServer(builder.Build().GetConnectionString("DefaultConnection")).Options; context = new HungryPizzaContext(optionsBuilder); var mockMapper = new MapperConfiguration(cfg => { cfg.AddProfile(new AutoMapper()); }); mapper = mockMapper.CreateMapper(); }
public CustomerServices(HungryPizzaContext context, IMapper mapper) { _context = context; _mapper = mapper; }