Ejemplo n.º 1
0
        protected async Task <RestaurantObjects> CheckRestaurantExistenceAsync(long restaurantId)
        {
            RestaurantObjects rest = await RestaurantRepo.FindById(restaurantId);

            if (rest == null)
            {
                throw new Exception(String.Format("Restaurant with id {0} does not exist", restaurantId));
            }

            return(rest);
        }