Exemplo n.º 1
0
        /// <summary>
        /// Get a list of TypeOfDish
        /// </summary>
        /// <returns></returns>
        public async Task <List <TypeOfDish> > GetAllTypeOfDish()
        {
            ITypeOfDishRepository _typeOfDish  = _db.GetRepository <ITypeOfDishRepository>();
            List <TypeOfDish>     typeOfDishes = (await _typeOfDish.GetAllAsync()).ToList();

            return(typeOfDishes);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Get a TypeOfDish
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task <TypeOfDish> GetTypeOfDishById(int id)
        {
            ITypeOfDishRepository _dish = _db.GetRepository <ITypeOfDishRepository>();

            return(await _dish.GetAsync(id));
        }