Ejemplo n.º 1
0
        /*
         * CRUD + LIST
         */

        #region CREATE

        public virtual OperationResult Create(Service service)
        {
            try
            {
                using var transactionScope = new TransactionScope(TransactionScopeOption.Required, transactionOptions, TransactionScopeAsyncFlowOption.Enabled);
                _dao.Create(service);
                transactionScope.Complete();

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