コード例 #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));
 }