Template Response

This commit is contained in:
Mikhail Trubnikov
2023-09-19 16:42:06 +10:00
parent 1857a96249
commit a8c015ce7b
9 changed files with 95 additions and 22 deletions

View File

@@ -26,5 +26,16 @@ namespace PARR.DAL.Services.Implementations
{
return await EntitySet.FirstOrDefaultAsync(t => t.Name == name);
}
public IQueryable<Template> GetWithIncludes()
{
return Get()
.Include(h => h.Host)
.Include(a => a.ApplicationsInWork)
.ThenInclude(w => w!.Work)
.ThenInclude(t => t!.Tnk)
.ThenInclude(s => s!.Subprocess)
.ThenInclude(p => p!.Process);
}
}
}

View File

@@ -6,5 +6,7 @@ namespace PARR.DAL.Services.Interfaces
public interface ITemplateService : IBaseService<Template>
{
Task<Template?> GetTemplateByNameAsync(string name);
IQueryable<Template> GetWithIncludes();
}
}