public async Task <FacebookAdto> GetAsync(GetFacebookAdto getFacebookAdto)
        {
            using (ITransaction transaction = _transactionManager.Create())
            {
                if (!(await _queryRepository.GetByIdAsync(getFacebookAdto.Id) is AuthenticationGrantTypeFacebook authenticationGrantTypeFacebook))
                {
                    throw new BusinessApplicationException(ExceptionType.NotFound, "Authentication service not found");
                }

                transaction.Commit();

                return(CreateFacebookAdto(authenticationGrantTypeFacebook));
            }
        }
Ejemplo n.º 2
0
 public Task <FacebookAdto> GetAsync(GetFacebookAdto getFacebookAdto)
 {
     return(_securityApplicationService.SecureAsync(() => _facebookAuthenticationServiceApplicationService.GetAsync(getFacebookAdto),
                                                    DefaultAuthorisationContext.Create(AuthorisationResource.AuthenticationService, AuthorisationAction.Get)));
 }