Пример #1
0
        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));
        }
Пример #2
0
 public async Task <QueryResult <CreditAccountViewModel> > GetCreditAccountAsync(CreditAccountQuery query)
 {
     return((await RunQueryAsync <CreditAccountQuery, CreditAccountDto>(_queryRepository, query)).MapTo <CreditAccountViewModel>());
 }
Пример #3
0
 public async Task <QueryResult <CreditAccountDto> > GetCreditAccountDtoAsync(CreditAccountQuery query)
 {
     return(await RunQueryAsync <CreditAccountQuery, CreditAccountDto>(_queryRepository, query));
 }
Пример #4
0
 public QueryResult <CreditAccountViewModel> GetCreditAccount(CreditAccountQuery query)
 {
     return(RunQuery <CreditAccountQuery, CreditAccountDto>(_queryRepository, query).MapTo <CreditAccountViewModel>());
 }
Пример #5
0
 public QueryResult <CreditAccountDto> GetCreditAccountDto(CreditAccountQuery query)
 {
     return(RunQuery <CreditAccountQuery, CreditAccountDto>(_queryRepository, query));
 }