Пример #1
0
        public async Task <IActionResult> Departments()
        {
            try
            {
                List <DepartmentViewModel> departments = await _departmentsRepository.AllDepartments();

                return(Ok(departments));
            }
            catch (Exception x)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }