Пример #1
0
        public async Task <ActionResult <ResponseDto <List <Department> > > > GetDepartments()
        {
            ResponseDto <List <Department> > response = await _departmentsService.GetDepartments();

            if (response.HasErrors)
            {
                return(BadRequest(response));
            }

            return(Ok(response));
        }
Пример #2
0
        public IActionResult GetDepartments()
        {
            var Response = _IDepartmentsService.GetDepartments();

            return(Ok(Response));
        }
Пример #3
0
        public Task <List <Department> > GetDepartments()
        {
            var departments = _departmentsService.GetDepartments();

            return(departments);
        }
 public async Task <IActionResult> Get()
 {
     return(Ok(await _departmentsService.GetDepartments()));
 }