public WoodWorkshopService() { _woodWorkshopRepository = new WoodWorkshopRepository(); var mapperConfig = new MapperConfiguration(cfg => { var map = cfg.CreateMap <WoodFurnitureModel, WoodFurniture>().ReverseMap(); }); _mapper = new Mapper(mapperConfig); }
public WoodWorkshopService() { _woodWorkshopRepository = new WoodWorkshopRepository <WoodFurnitureOrder>(new WoodWorkshopContext()); _woodTypeRepository = new WoodTypeRepository(new WoodWorkshopContext()); _furnitureTypeRepository = new FurnitureTypeRepository(new WoodWorkshopContext()); var mapperConfig = new MapperConfiguration(cfg => { cfg.CreateMap <WoodFurnitureOrderModel, WoodFurnitureOrder>().ReverseMap(); cfg.CreateMap <FurnitureTypeModel, FurnitureType>().ReverseMap(); cfg.CreateMap <WoodTypeModel, WoodType>().ReverseMap(); cfg.CreateMap <CustomerModel, Customer>().ReverseMap(); cfg.CreateMap <EpoxyModel, Epoxy>().ReverseMap(); }); _mapper = new Mapper(mapperConfig); }