public CreditAccountDto Handle(CreditAccountQuery query) { CreditAccountModel model = null; if (query.Id.HasValue) { model = ModelsDao.Find(query.Id.Value); } if (!string.IsNullOrEmpty(query.AgreementNumber)) { model = ModelsDao.FirstOrDefault(u => u.CreditAgreementNumber == query.AgreementNumber); } return(model == null ? null : Mapper.Map <CreditAccountDto>(model)); }
public async Task <QueryResult <CreditAccountViewModel> > GetCreditAccountAsync(CreditAccountQuery query) { return((await RunQueryAsync <CreditAccountQuery, CreditAccountDto>(_queryRepository, query)).MapTo <CreditAccountViewModel>()); }
public async Task <QueryResult <CreditAccountDto> > GetCreditAccountDtoAsync(CreditAccountQuery query) { return(await RunQueryAsync <CreditAccountQuery, CreditAccountDto>(_queryRepository, query)); }
public QueryResult <CreditAccountViewModel> GetCreditAccount(CreditAccountQuery query) { return(RunQuery <CreditAccountQuery, CreditAccountDto>(_queryRepository, query).MapTo <CreditAccountViewModel>()); }
public QueryResult <CreditAccountDto> GetCreditAccountDto(CreditAccountQuery query) { return(RunQuery <CreditAccountQuery, CreditAccountDto>(_queryRepository, query)); }