Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        private static List <dish> GetDishesEf()
        {
            var context              = new restaurant_dbContext();
            IQueryable <dish> query  = context.dish;
            List <dish>       dishes = query.ToList();

            return(dishes);
        }