Fix null input vari
This commit is contained in:
@@ -24,6 +24,9 @@ namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
|
||||
public async Task<bool> DeleteAsync(JobStepModel rec2del)
|
||||
{
|
||||
// Add validation for null entity
|
||||
if (rec2del == null) return false;
|
||||
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
|
||||
// Wrap in transaction for atomicity (multi-row update + delete)
|
||||
@@ -84,6 +87,9 @@ namespace EgwCoreLib.Lux.Data.Repository.Job
|
||||
|
||||
public async Task<bool> MoveAsync(JobStepModel selRec, bool moveUp)
|
||||
{
|
||||
// Add validation for null entity
|
||||
if (selRec == null) return false;
|
||||
|
||||
await using var dbCtx = await CreateContextAsync();
|
||||
|
||||
// Wrap in transaction for atomicity (multi-row update)
|
||||
|
||||
Reference in New Issue
Block a user