public async Task <ActionResult <ResponseDto <List <Department> > > > GetDepartments() { ResponseDto <List <Department> > response = await _departmentsService.GetDepartments(); if (response.HasErrors) { return(BadRequest(response)); } return(Ok(response)); }
public IActionResult GetDepartments() { var Response = _IDepartmentsService.GetDepartments(); return(Ok(Response)); }
public Task <List <Department> > GetDepartments() { var departments = _departmentsService.GetDepartments(); return(departments); }
public async Task <IActionResult> Get() { return(Ok(await _departmentsService.GetDepartments())); }