Связь Hosts & templates. Переделал респонс для get all templates

This commit is contained in:
Mikhail Trubnikov
2023-09-19 15:47:50 +10:00
parent 7b17d3260d
commit bb2e063d2f
7 changed files with 1471 additions and 17 deletions

View File

@@ -43,7 +43,14 @@ namespace PARR.API.Controllers.V1
var paginationFilter = mapper.Map<PaginationFilter>(paginationQuery);
IQueryable<Template> query = templateService.Get()
.OrderBy(t => t.Name);
.Include(h => h.Host)
.Include(a => a.ApplicationsInWork)
.ThenInclude(w => w!.Work)
.ThenInclude(t => t!.Tnk)
.ThenInclude(s => s!.Subprocess)
.ThenInclude(p => p!.Process)
.OrderBy(t => t.Name)
.AsSplitQuery();
if (filter.StatusCode.HasValue)
{