fix(events): query duplicate retries through context interface
This commit is contained in:
1 parent
21842bdf09
commit
8fafbdfaec
1 file changed
-1
@@ -49,7 +49,6 @@ public class CreateEventHandler : IRequestHandler<CreateEventCommand, ServiceRes
|
||||
}
|
||||
catch (DbUpdateException) when (request.EventId.HasValue)
|
||||
{
|
||||
_context.Entry(ev).State = EntityState.Detached;
|
||||
var duplicate = await _context.CameraEvents.AsNoTracking().Include(e => e.Camera)
|
||||
.FirstOrDefaultAsync(e => e.Id == eventId && e.OccurredAt == occurredAt, ct)
|
||||
.ConfigureAwait(false);
|
||||
|
||||
Reference in new issue
Block a user