public async Task <ActionResult <DepartmentDto> > AddDepartment([FromBody] Department department) { await _repository.AddDepartmentAsync(department); await _repository.CommitAsync(); return(CreatedAtAction(nameof(GetDepartment), new { departmentId = department.DepartmentId }, department.Adapt <DepartmentDto>())); }