refator(SaveDocStatusCommandHandler): use SingleOrDefaultAsync instead of FirstOrDefaultAsync
This commit is contained in:
parent
82150290d2
commit
cced0e5579
@ -91,7 +91,7 @@ public class SaveDocStatusCommandHandler : IRequestHandler<SaveDocStatusCommand,
|
||||
await _repo.CreateAsync(cReq, cancel);
|
||||
}
|
||||
|
||||
var docStatus = await _repo.ReadOnly().Where(eExp).Where(rExp).FirstOrDefaultAsync(cancel);
|
||||
var docStatus = await _repo.ReadOnly().Where(eExp).Where(rExp).SingleOrDefaultAsync(cancel);
|
||||
return docStatus?.Id;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user