public async Task <IActionResult> Save(RestaurantChefDto dto) { var result = new ResponseModel <RestaurantChefDto>(); if (!ModelState.IsValid) { result.IsFailed = true; result.ErrorCode = CommonConstants.ErrorCode.InvalidModel; } else { result = _service.Save(dto); } result = MessageHelper <RestaurantChefDto> .GetResponse(result); return(Ok(result)); }