private static List <ingredients> GetIngredientsEf(int n) { var context = new restaurant_dbContext(); IQueryable <ingredients> query = context.ingredients.Where(c => c.id_ingredient == n); List <ingredients> ingredients = query.ToList(); return(ingredients); }
private static List <dish> GetDishesEf(int n) { var context = new restaurant_dbContext(); IQueryable <dish> query = context.dish.Where(c => c.id_dish == n); List <dish> Dishes = query.ToList(); return(Dishes); }
private static List <recipes> GetRecipesEf(int n) { var context = new restaurant_dbContext(); IQueryable <recipes> query = context.recipes.Where(c => c.dish_id == n); List <recipes> recipes = query.ToList(); return(recipes); }
private static List <dish> GetDishesEf() { var context = new restaurant_dbContext(); IQueryable <dish> query = context.dish; List <dish> dishes = query.ToList(); return(dishes); }