feat(api): в UnitWithAttributesResponse добавлены родительские и дочерние ЭК
This commit is contained in:
@@ -53,7 +53,9 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.UnitValues)
|
||||
.ThenInclude(uv => uv.Value)
|
||||
.Include(tf => tf.UnitValues)
|
||||
.ThenInclude(uv => uv.Field);
|
||||
.ThenInclude(uv => uv.Field)
|
||||
.Include(p => p.ParentUnits).ThenInclude(t=>t.ParentUnit)
|
||||
.Include(c => c.ChildUnits).ThenInclude(t=>t.ChildUnit);
|
||||
|
||||
var units = await unitService.GetPage(query, paginationFilter).ToListAsync();
|
||||
|
||||
@@ -80,6 +82,8 @@ namespace PARR.API.Controllers.V1
|
||||
.ThenInclude(uv => uv.Value)
|
||||
.Include(tf => tf.UnitValues)
|
||||
.ThenInclude(uv => uv.Field)
|
||||
.Include(p => p.ParentUnits).ThenInclude(t => t.ParentUnit)
|
||||
.Include(c => c.ChildUnits).ThenInclude(t => t.ChildUnit)
|
||||
.FirstOrDefaultAsync(t => t.Id == id);
|
||||
|
||||
if (unit == null)
|
||||
|
||||
Reference in New Issue
Block a user