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