public ActionResult <RestaurantByID> GetRestaurantByID(int restaurantID) { try { var result = _repository.GetRestaurantByID(restaurantID); IMapper mapper = EDeliveryProfile.GetRestaurantByID(); return(mapper.Map <RestaurantByID>(result)); } catch (Exception ex) { _logger.LogError($"Failed to get the Restaurant:{ex}"); return(BadRequest("Failed to get the Restaurant")); } }