diff --git a/PARR.API/Controllers/V1/JobController.cs b/PARR.API/Controllers/V1/JobController.cs index a3b724c1..7f548644 100644 --- a/PARR.API/Controllers/V1/JobController.cs +++ b/PARR.API/Controllers/V1/JobController.cs @@ -88,10 +88,10 @@ namespace PARR.API.Controllers.V1 query = query .Include(t => t.UnitFilters) - .ThenInclude(t => t.FieldFilters) + .ThenInclude(t => t.FieldFilters.OrderBy(o => o.UnitField!.AihitName)) .ThenInclude(t => t.UnitField) .Include(t => t.UnitFilters) - .ThenInclude(t => t.RelationshipFilters) + .ThenInclude(t => t.RelationshipFilters.OrderBy(o => o.UnitField!.AihitName)) .ThenInclude(t => t.UnitField); } @@ -125,10 +125,10 @@ namespace PARR.API.Controllers.V1 .Include(t => t.Tnk) .Include(t => t.Group) .Include(t => t.UnitFilters) - .ThenInclude(t => t.FieldFilters) + .ThenInclude(t => t.FieldFilters.OrderBy(o=>o.UnitField!.AihitName)) .ThenInclude(t => t.UnitField) .Include(t => t.UnitFilters) - .ThenInclude(t => t.RelationshipFilters) + .ThenInclude(t => t.RelationshipFilters.OrderBy(o => o.UnitField!.AihitName)) .FirstOrDefaultAsync(t => t.Id == id); if (job == null) @@ -185,10 +185,10 @@ namespace PARR.API.Controllers.V1 .Include(t => t.Tnk) .Include(t => t.Group) .Include(t => t.UnitFilters) - .ThenInclude(t => t.FieldFilters) + .ThenInclude(t => t.FieldFilters.OrderBy(o => o.UnitField!.AihitName)) .ThenInclude(t => t.UnitField) .Include(t => t.UnitFilters) - .ThenInclude(t => t.RelationshipFilters) + .ThenInclude(t => t.RelationshipFilters.OrderBy(o => o.UnitField!.AihitName)) .FirstOrDefaultAsync(t => t.Id == job.Id); var locationUri = uriService.GetUri(ApiRoutes.Job.Get, ApiRoutes.Job.getParam, createdJob!.Id);