Resolve all 46 low-severity architecture review findings
This commit is contained in:
+12
@@ -456,6 +456,18 @@ public class TemplateEngineRepository : ITemplateEngineRepository
|
||||
.ToListAsync(cancellationToken);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<IReadOnlyList<Instance>> GetTopologyInstancesAsync(int siteId, int? areaId, int skip, int take, CancellationToken cancellationToken = default)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(skip);
|
||||
ArgumentOutOfRangeException.ThrowIfLessThan(take, 1);
|
||||
ArgumentOutOfRangeException.ThrowIfGreaterThan(take, 50);
|
||||
return await _context.Instances.AsNoTracking()
|
||||
.Where(i => i.SiteId == siteId && i.AreaId == areaId)
|
||||
.OrderBy(i => i.UniqueName).ThenBy(i => i.Id)
|
||||
.Skip(skip).Take(take).ToListAsync(cancellationToken);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<Instance?> GetInstanceByUniqueNameAsync(string uniqueName, CancellationToken cancellationToken = default)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user