public IActionResult Add(Maintenance maintenance) { var result = _maintenanceService.Add(maintenance); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Message)); }
public IActionResult Add(MaintenanceDto maintenanceDto) { var response = new ResponseViewModel(); response = _maintenanceService.Add(maintenanceDto); if (!response.IsSuccess) { return(BadRequest(response)); } return(Ok(response)); }