public async Task <IActionResult> DeleteDepartmentAsync([FromRoute] string id) { if (string.IsNullOrWhiteSpace(id)) { return(BadRequest("Id is null or empty")); } var result = await _departmentManager.DeleteDepartmentAsync(id); if (result) { return(BadRequest("Department not found")); } return(Ok()); }