コード例 #1
0
        public void UpdateGameFiles(GameFileFieldType ftWhere, GameFileFieldType ftSet, object fWhere, object fSet)
        {
            List <DbParameter> parameters = new List <DbParameter> {
                this.DataAccess.DbAdapter.CreateParameter("set1", (fSet == null) ? DBNull.Value : fSet),
                this.DataAccess.DbAdapter.CreateParameter("where1", (fWhere == null) ? DBNull.Value : fWhere)
            };

            this.DataAccess.ExecuteNonQuery($"update GameFiles set {ftWhere.ToString("g")} = @set1 where {ftSet.ToString("g")} = @where1", parameters);
        }
コード例 #2
0
        public void UpdateGameFiles(GameFileFieldType ftWhere, GameFileFieldType ftSet, object fWhere, object fSet)
        {
            List <DbParameter> parameters = new List <DbParameter>
            {
                DataAccess.DbAdapter.CreateParameter("set1", fSet ?? DBNull.Value),
                DataAccess.DbAdapter.CreateParameter("where1", fWhere ?? DBNull.Value)
            };

            DataAccess.ExecuteNonQuery(string.Format(@"update GameFiles set {0} = @set1 where {1} = @where1", ftWhere.ToString("g"), ftSet.ToString("g")), parameters);
        }