public async Task <IActionResult> Add([FromBody] FacilityTypeDTO facilityType) { var outputHandler = await _service.Add(facilityType); if (outputHandler.IsErrorOccured) { return(BadRequest(outputHandler.Message)); } return(Created("", outputHandler.Message)); }
public ActionResult <string> Add(FacilityTypeRequest ftData) { try { var facilityType = _facilityTypeService.Add(ftData); return(string.IsNullOrEmpty(facilityType) ? $"Unable to add facility type data" : facilityType); } catch (Exception e) { return($"Unable to add facility type data - {e.Message}"); } }