public static FullRecipeVM MapFullRecipe(FullRecipeDTO dto) { return(new FullRecipeVM() { Recipe = dto.Recipe.DTOToViewModel(MapRecipe), Ingredients = dto.Ingredients.DTOToViewModelList(MapIngredientWithCount), Cuisines = dto.Cuisines.DTOToViewModelList(MapCuisine), Steps = dto.Steps.DTOToViewModelList(MapStep) }); }
public FullRecipeDTO GetFull(int id) { RecipeDTO recipe = Get(id); List <IngredientWithCountDTO> ingredients = GetIngredientsWithCount(id); List <StepDTO> steps = stepProcessor.Get(id); List <CuisineDTO> cuisines = GetCuisines(id); FullRecipeDTO fullRecipeDTO = new FullRecipeDTO() { Recipe = recipe, Ingredients = ingredients, Cuisines = cuisines, Steps = steps } ; return(fullRecipeDTO); }