public async Task <IActionResult> GetFoodHubById(int foodHubId) { try { var _serviceEndPoint = new ServicesEndPoint(_unitOfWork, _emailService); FoodHub result = await _serviceEndPoint.GetFoodHubById(foodHubId); if (result == null) { return(NotFound(result)); } return(Ok(result)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }