コード例 #1
0
 public async Task <bool> SaveProcessRequestTypes(IProcess tEntity, long processId)
 {
     foreach (var requestType in tEntity.ProcessRequestTypes)
     {
         IProcessRequestType processType = requestType;
         processType.ProcessId     = processId;
         processType.RequestTypeId = requestType.Id;
         var savedUser = await this._processRequestTypeRepository.AddNew(requestType);
     }
     return(true);
 }
コード例 #2
0
        public async Task <IProcessRequestType> AddNew(IProcessRequestType entity)
        {
            try
            {
                this.StartTransaction();
                var savedEntity = await base.AddNew(entity as TProcessRequestType);

                this.CommitTransaction();

                return(savedEntity);
            }
            catch (PostgresException ex)
            {
                throw new EntityUpdateException(ex);
            }
            catch
            {
                throw;
            }
        }