fix(deployment): read every external system's methods in one query for the artifact snapshot (review 2026-10-21 04/P7)
This commit is contained in:
+12
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Deployment;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.ExternalSystems;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Entities.Instances;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Interfaces.Repositories;
|
||||
using ZB.MOM.WW.ScadaBridge.Commons.Types.Deployment;
|
||||
@@ -308,6 +309,17 @@ public class DeploymentManagerRepository : IDeploymentManagerRepository
|
||||
return stale.Count;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IReadOnlyList<ExternalSystemMethod>> GetAllExternalSystemMethodsAsync(
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
return await _dbContext.Set<ExternalSystemMethod>()
|
||||
.AsNoTracking()
|
||||
.OrderBy(m => m.ExternalSystemDefinitionId)
|
||||
.ThenBy(m => m.Id)
|
||||
.ToListAsync(cancellationToken);
|
||||
}
|
||||
|
||||
// --- DeployedConfigSnapshot ---
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user