public List <Ingredient> GetIngredients() { try { using (var ctx = new EntityRecipeAppDB()) { List <Ingredient> ingredients = ( from a in ctx.Ingredients select a ).ToList(); return(ingredients); } } catch (Exception ex) { throw ex; } }
public List <Recipe> GetRecipes() { try { using (var ctx = new EntityRecipeAppDB()) { List <Recipe> recipes = ( from a in ctx.Recipes select a ).ToList(); return(recipes); } } catch (Exception ex) { throw ex; } }