Exemplo n.º 1
0
        public async virtual Task <OperationResult> UpdateAsync(Profile profile)
        {
            try
            {
                using var transactionScope = new TransactionScope(TransactionScopeOption.Required, transactionOptions, TransactionScopeAsyncFlowOption.Enabled);
                await _dao.UpdateAsync(profile);

                transactionScope.Complete();

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