EmailDispatcher ist integriert.

This commit is contained in:
Developer 02
2024-06-12 00:40:50 +02:00
parent 0268756cf9
commit 38aa6a6217
21 changed files with 367 additions and 94 deletions

View File

@@ -49,5 +49,17 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
.FirstOrDefaultAsync();
public async Task<int> CountAsync(string uuid, string signature) => await ReadWhere(uuid: uuid, signature: signature).CountAsync();
}
public IQueryable<EnvelopeReceiver> ReadById(int envelopeId, int receiverId) => _dbSet
.Where(er => er.EnvelopeId == envelopeId && er.ReceiverId == receiverId);
public async Task<EnvelopeReceiver?> ReadByIdAsync(int envelopeId, int receiverId)
=> await ReadById(envelopeId: envelopeId, receiverId: receiverId)
.FirstOrDefaultAsync();
public async Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId)
=> await ReadById(envelopeId: envelopeId, receiverId: receiverId)
.Select(er => er.AccessCode)
.FirstOrDefaultAsync();
}
}