Animierte Navbar-Anzeige für envelopeDto-Informationen hinzugefügt
This commit is contained in:
@@ -8,5 +8,7 @@ namespace EnvelopeGenerator.Application.Contracts
|
||||
public interface IEnvelopeService : IBasicCRUDService<IEnvelopeRepository, EnvelopeDto, Envelope, int>
|
||||
{
|
||||
Task<IServiceResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool receivers = false, bool history = false);
|
||||
|
||||
Task<IServiceResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withReceivers = false, bool withHistory = false);
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,19 @@ namespace EnvelopeGenerator.Application.Services
|
||||
|
||||
public async Task<IServiceResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool receivers = false, bool history = false)
|
||||
{
|
||||
var entities = await _repository.ReadAllWithAsync(documents: documents, receivers: receivers, history: history);
|
||||
var readDto = _mapper.MapOrThrow<IEnumerable<EnvelopeDto>>(entities);
|
||||
var envelopes = await _repository.ReadAllWithAsync(documents: documents, receivers: receivers, history: history);
|
||||
var readDto = _mapper.MapOrThrow<IEnumerable<EnvelopeDto>>(envelopes);
|
||||
return Successful(readDto);
|
||||
}
|
||||
|
||||
public async Task<IServiceResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withReceivers = false, bool withHistory = false)
|
||||
{
|
||||
var envelope = await _repository.ReadByUuidAsync(uuid: uuid, withDocuments: withDocuments, withReceivers: withReceivers, withHistory: withHistory);
|
||||
|
||||
if (envelope is null)
|
||||
return Failed<EnvelopeDto>();
|
||||
|
||||
var readDto = _mapper.MapOrThrow<EnvelopeDto>(envelope);
|
||||
return Successful(readDto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user