Exemplo n.º 1
0
        public virtual OperationResult <List <Profile> > List()
        {
            try
            {
                using var transactionScope = new TransactionScope(TransactionScopeOption.Required, transactionOptions, TransactionScopeAsyncFlowOption.Enabled);
                var result = _dao.List();
                transactionScope.Complete();

                return(new OperationResult <List <Profile> >()
                {
                    Success = true, Result = result
                });
            }
            catch (Exception e)
            {
                return(new OperationResult <List <Profile> >()
                {
                    Success = false, Exception = e
                });
            }
        }