示例#1
0
            public async Task <WebApiResult <IEnumerable <IDictionary <string, object> > > > Handle(ContractTypeQueryCommand request, CancellationToken cancellationToken)
            {
                try
                {
                    var contracts = (await preminumFinanceRepository.GetContractType()).Select(a => (IDictionary <string, object>)a);

                    return(new WebApiResult <IEnumerable <IDictionary <string, object> > >(contracts));
                }
                catch (Exception ex)
                {
                    return(WebApiResult <IEnumerable <IDictionary <string, object> > > .Error(ex.Message));
                }
            }
示例#2
0
            public async Task <IEnumerable <IDictionary <string, object> > > Handle(ContractTypeQueryCommand request, CancellationToken cancellationToken)
            {
                var contracts = (await preminumFinanceRepository.GetContractType()).Select(a => (IDictionary <string, object>)a);

                return(contracts);
            }