public async Task <IEnumerable <ReferenceDataValueAdto> > GetAllAsync(GetAllReferenceDataAdto getAllReferenceDataAdto)
        {
            using (ITransaction transaction = _transactionManager.Create())
            {
                IEnumerable <ReferenceDataValueAdto> referenceDataValueAdtos = (await _referenceDataQueryRepository.GetAllAsync(getAllReferenceDataAdto.Type))
                                                                               .Select(r => new ReferenceDataValueAdto
                {
                    Id   = r.Id,
                    Code = r.Code
                });

                transaction.Commit();

                return(referenceDataValueAdtos);
            }
        }
Esempio n. 2
0
 public Task <IEnumerable <ReferenceDataValueAdto> > GetAllAsync(GetAllReferenceDataAdto getAllReferenceDataAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _referenceDataApplicationService.GetAllAsync(getAllReferenceDataAdto),
                                                    DefaultAuthorisationContext.Create(AuthorisationResource.ReferenceData, AuthorisationAction.Search)));
 }