public HUTModels.Recipe GetRecipeWithIngredients(int recipeId) { IngredientBLL ingredientBLL = new IngredientBLL(this.repo); // must be done in two steps due to not using the context directly // getting the related data does not work with this repo HUTDataAccessLayerSQL.Recipe recipe = repo.GetById <HUTDataAccessLayerSQL.Recipe>(recipeId); HUTModels.Recipe model = new HUTModels.Recipe() { Archived = recipe.Archived, DateEntered = recipe.DateEntered, Description = recipe.Description, RecipeId = recipe.RecipeId, Ingredients = ingredientBLL.GetPerRecipe(recipeId) }; return(model); }