Beispiel #1
0
        public KeyValuePair <string, List <SugarParameter> > ToSql()
        {
            PreToSql();
            string sql = UpdateBuilder.ToSqlString();

            RestoreMapping();
            return(new KeyValuePair <string, List <SugarParameter> >(sql, UpdateBuilder.Parameters));
        }
Beispiel #2
0
        private string _ExecuteCommand()
        {
            PreToSql();
            AutoRemoveDataCache();
            Check.Exception(UpdateBuilder.WhereValues.IsNullOrEmpty() && GetPrimaryKeys().IsNullOrEmpty(), "You cannot have no primary key and no conditions");
            string sql = UpdateBuilder.ToSqlString();

            ValidateVersion();
            RestoreMapping();
            Before(sql);
            return(sql);
        }