Browse Source

Update Post.md

pull/16048/head
Onur Pıçakcı 3 years ago
parent
commit
11f61c0063
  1. 8
      docs/en/Community-Articles/2023-03-20- IdentityUser-Relationships/Post.md

8
docs/en/Community-Articles/2023-03-20- IdentityUser-Relationships/Post.md

@ -238,7 +238,7 @@ namespace IdentityRelationship.Departments;
public interface IDepartmentAppService : IApplicationService
{
public Task<PagedResultDto<DepartmentDto>> GetAsync();
public Task<ListResultDto<DepartmentDto>> GetAsync();
}
```
@ -263,12 +263,10 @@ public class DepartmentAppService : IdentityRelationshipAppService, IDepartmentA
_departmentRepository = departmentRepository;
}
public async Task<PagedResultDto<DepartmentDto>> GetAsync()
public async Task<ListResultDto<DepartmentDto>> GetAsync()
{
var departments = await _departmentRepository.GetListAsync();
var totalCount = await _departmentRepository.GetCountAsync();
return new PagedResultDto<DepartmentDto>(totalCount,
return new ListResultDto<DepartmentDto>(
ObjectMapper.Map<List<Departments.Department>, List<DepartmentDto>>(departments));
}
}

Loading…
Cancel
Save