public async Task <IActionResult> PostCreateFoodHub([FromBody] FoodHubViewModel foodHubViewModel) { try { var _serviceEndPoint = new ServicesEndPoint(_unitOfWork, _emailService); var foodHub = _Mapper.Map <FoodHub>(foodHubViewModel); bool result = await _serviceEndPoint.PostCreateFoodHub(foodHub); if (!result) { return(NotFound(foodHub)); } return(Ok(new { message = "Succesfully Created!", result = result })); } catch (Exception ex) { return(BadRequest(ex.Message)); } }