// bll dto to itemsView dto public v2.Item MapToItemDisplay(BLL.App.DTO.Item outObject) { return(new v2.Item() { Id = outObject.Id, Description = outObject.Description, UserId = outObject.UserId, Price = outObject.Price, BrandId = outObject.BrandId, Discount = outObject.Discount, Name = outObject.Name, Brand = outObject.Brand == null ? null : BrandMapper.Map(outObject.Brand), Categories = outObject.ItemCategories.Select(ic => CategoryMapper.Map(ic.Category !)) });
// bll dto to public api dto public v2.Item Map(BLL.App.DTO.Item outObject) { return(new v2.Item() { Id = outObject.Id, Description = outObject.Description, UserId = outObject.UserId, Price = outObject.Price, BrandId = outObject.BrandId, Discount = outObject.Discount, Name = outObject.Name, Brand = outObject.Brand == null ? null : BrandMapper.Map(outObject.Brand), Categories = null }); }
public ItemMapper() { CategoryMapper = new CategoryMapper(); BrandMapper = new BrandMapper(); }
public WarehouseMapper() { CategoryMapper = new CategoryMapper(); BrandMapper = new BrandMapper(); ItemMapper = new ItemMapper(); }