コード例 #1
0
        public override LogicFileInfoData CreateFileInfo(LogicFileInfoData logicFileInfo, DbTransaction trans)
        {
            LogicFileInfoData result = (LogicFileInfoData)logicFileInfo.Clone();
            DbCommand         dbCmd  = this.CreateFileInfoCommand;
            GuidEntityWrapper <LogicFileInfoData> wrapper = Utils.CreateWrapperData <LogicFileInfoData>(result, true);

            this.Adapter.SetParametersValue(dbCmd.Parameters, wrapper);
            if (trans != null)
            {
                this.Database.ExecuteNonQuery(dbCmd, trans);
            }
            else
            {
                this.Database.ExecuteNonQuery(dbCmd);
            }
            return(result);
        }
コード例 #2
0
        public override PhysicalFileInfoData UpdatePhyscialFileInfo(PhysicalFileInfoData physicalFileInfo, DbTransaction trans)
        {
            PhysicalFileInfoData result = (PhysicalFileInfoData)physicalFileInfo.Clone();
            DbCommand            dbCmd  = this.UpdatePhysicalFileInfoCommand;
            GuidEntityWrapper <PhysicalFileInfoData> wrapper = Utils.CreateWrapperData <PhysicalFileInfoData>(result, false);

            this.Adapter.SetParametersValue(dbCmd.Parameters, wrapper);
            if (trans != null)
            {
                this.Database.ExecuteNonQuery(dbCmd, trans);
            }
            else
            {
                this.Database.ExecuteNonQuery(dbCmd);
            }
            return(result);
        }