private void MapWasteProductViewToModel(FoodWaste bill, Command request, string categoryId) { bill.Price = request.Price; bill.Month = request.Month; bill.Year = request.Year; bill.CategoryId = categoryId; }
private FoodWaste MapWasteProductViewToModel(Command command, string categoryId) { var res = new FoodWaste(); res.Month = command.Month; res.Price = command.Price; res.Year = command.Year; res.CategoryId = categoryId; return(res); }
private FoodWasteGetAllViewItem MapWasteProductToView(FoodWaste product) { var res = new FoodWasteGetAllViewItem(); res.Id = product.Id; res.CategoryId = product.CategoryId; res.Month = product.Month; res.Year = product.Year; res.Price = product.Price; res.Category = new FoodCategoryView { CreationDate = product.Category.CreationDate, Id = product.Category.Id, Name = product.Category.Name }; return(res); }