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); }
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; } }