public async Task <ActionResult <Restaurant> > GetRestaurant(string id) { if (id == null || id == "") { return(BadRequest()); } var resto = await restaurantRepo.Get(id); if (resto == null) { return(NotFound()); } // var restoDTO = mapper.Map<RestaurantDTO>(resto); return(Ok(resto)); }
public Restaurant Get(int id) { var Restaurant = _restaurantRepo.Get(id); return(Restaurant); }
public IEnumerable <Restaurant> Get() { return(_repository.Get()); }
/// <summary> /// List of all restaurants /// </summary> /// <returns></returns> public List <Restaurant> Get() { return(restaurantRepo.Get()); }
public Restaurant Get(int id) { return(_restaurantContext.Get(id)); }