public BreederStationDataLayer.Orm.Dto.Food mapDomainToDtoObject(Food food) { BreederStationDataLayer.Orm.Dto.Food dtoFood = new BreederStationDataLayer.Orm.Dto.Food { Id = food.Id, Carbohydrates = food.Carbohydrates, Fat = food.Fat, Proteins = food.Proteins, Price = food.Price, Name = food.Name, FoodRunningOut = food.FoodRunningOut, Company = new BreederStationDataLayer.Orm.Dto.Company { Id = food.Company.Id, Trademark = food.Company.Trademark } }; return(dtoFood); }
public Food mapDtoToDomainObject(BreederStationDataLayer.Orm.Dto.Food dtoFood) { Food food = new Food { Id = dtoFood.Id, Carbohydrates = dtoFood.Carbohydrates, Fat = dtoFood.Fat, Proteins = dtoFood.Proteins, Price = dtoFood.Price, Name = dtoFood.Name, FoodRunningOut = dtoFood.FoodRunningOut, Company = new Company { Id = dtoFood.Company.Id, Trademark = dtoFood.Company.Trademark } }; return(food); }