refator(SaveDocStatusCommandHandler): use SingleOrDefaultAsync instead of FirstOrDefaultAsync
This commit is contained in:
@@ -91,7 +91,7 @@ public class SaveDocStatusCommandHandler : IRequestHandler<SaveDocStatusCommand,
|
|||||||
await _repo.CreateAsync(cReq, cancel);
|
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;
|
return docStatus?.Id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user