Continuo fix Repository fino Job

This commit is contained in:
Samuele E. Locatelli (W11-AI)
2026-03-25 16:01:21 +01:00
parent 42b30e1941
commit c031fe76ba
6 changed files with 84 additions and 3 deletions
@@ -12,6 +12,7 @@
#region Public Methods
/// <inheritdoc />
public async Task<bool> AddAsync(JobStepModel entity)
{
await using var dbCtx = await CreateContextAsync();
@@ -19,6 +20,7 @@
return await dbCtx.SaveChangesAsync() > 0;
}
/// <inheritdoc />
public async Task<bool> DeleteAsync(JobStepModel rec2del)
{
// Add validation for null entity
@@ -62,12 +64,14 @@
}
}
/// <inheritdoc />
public async Task<JobStepModel?> GetByIdAsync(int recId)
{
await using var dbCtx = await CreateContextAsync();
return await dbCtx.DbSetJobStep.FirstOrDefaultAsync(x => x.JobStepID == recId);
}
/// <inheritdoc />
public async Task<List<JobStepModel>> GetByParentAsync(int jobID)
{
await using var dbCtx = await CreateContextAsync();
@@ -82,6 +86,7 @@
.ToListAsync();
}
/// <inheritdoc />
public async Task<bool> MoveAsync(JobStepModel selRec, bool moveUp)
{
// Add validation for null entity
@@ -134,6 +139,7 @@
}
}
/// <inheritdoc />
public async Task<bool> UpdateAsync(JobStepModel entity)
{
await using var dbCtx = await CreateContextAsync();