เพิ่ม API
This commit is contained in:
parent
5c5c85a120
commit
c649861bd6
2 changed files with 61 additions and 1 deletions
|
|
@ -1240,7 +1240,16 @@ namespace BMA.EHR.Application.Repositories.Commands
|
|||
|
||||
var rootOcId = await GetRootOcIdAsync(UserOrganizationId);
|
||||
|
||||
var oc = await _dbContext.Set<OrganizationEntity>().FirstOrDefaultAsync(x => x.Id == rootOcId);
|
||||
var oc = await _dbContext.Set<OrganizationEntity>()
|
||||
.Include(x => x.OrganizationOrganization)
|
||||
.Select(x => new KeyValueItemResponse
|
||||
{
|
||||
Id = x.Id,
|
||||
Name = x.OrganizationOrganization!.Name
|
||||
})
|
||||
.FirstOrDefaultAsync(x => x.Id == rootOcId);
|
||||
if (oc != null)
|
||||
ret.Add(oc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue