Entität 'Receiver' zur Entität 'EnvelopeHistory' hinzugefügt.
This commit is contained in:
@@ -12,7 +12,7 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||
{
|
||||
}
|
||||
|
||||
private IQueryable<EnvelopeHistory> By(int? envelopeId = null, string? userReference = null, int? status = null)
|
||||
private IQueryable<EnvelopeHistory> By(int? envelopeId = null, string? userReference = null, int? status = null, bool withReceiver = false)
|
||||
{
|
||||
var query = _dbSet.AsQueryable();
|
||||
|
||||
@@ -25,6 +25,11 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||
if (status is not null)
|
||||
query = query.Where(eh => eh.Status == status);
|
||||
|
||||
if(withReceiver)
|
||||
query = query.Include(eh => eh.Receiver);
|
||||
|
||||
string qSt = query.ToQueryString();
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
@@ -32,10 +37,11 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||
envelopeId: envelopeId,
|
||||
userReference: userReference,
|
||||
status: status).CountAsync();
|
||||
|
||||
public async Task<IEnumerable<EnvelopeHistory>> ReadAsync(int? envelopeId = null, string? userReference = null, int? status = null) => await By(
|
||||
|
||||
public async Task<IEnumerable<EnvelopeHistory>> ReadAsync(int? envelopeId = null, string? userReference = null, int? status = null, bool withReceiver = true) => await By(
|
||||
envelopeId: envelopeId,
|
||||
userReference: userReference,
|
||||
status: status).ToListAsync();
|
||||
status: status,
|
||||
withReceiver: withReceiver).ToListAsync();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user