コード例 #1
0
 public KeyValuePair<string, List<SugarParameter>> ToSql()
 {
     DeleteBuilder.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo<T>();
     string sql = DeleteBuilder.ToSqlString();
     var paramters = DeleteBuilder.Parameters == null ? null : DeleteBuilder.Parameters.ToList();
     RestoreMapping();
     return new KeyValuePair<string, List<SugarParameter>>(sql, paramters);
 }
コード例 #2
0
 private void _ExecuteCommand(out string sql, out SugarParameter[] paramters)
 {
     DeleteBuilder.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo <T>();
     sql       = DeleteBuilder.ToSqlString();
     paramters = DeleteBuilder.Parameters == null ? null : DeleteBuilder.Parameters.ToArray();
     RestoreMapping();
     AutoRemoveDataCache();
     Before(sql);
 }
コード例 #3
0
        public int ExecuteCommand()
        {
            DeleteBuilder.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo <T>();
            string sql       = DeleteBuilder.ToSqlString();
            var    paramters = DeleteBuilder.Parameters == null ? null : DeleteBuilder.Parameters.ToArray();

            RestoreMapping();
            return(Db.ExecuteCommand(sql, paramters));
        }
コード例 #4
0
        public int ExecuteCommand()
        {
            DeleteBuilder.EntityInfo = this.Context.EntityMaintenance.GetEntityInfo <T>();
            string sql       = DeleteBuilder.ToSqlString();
            var    paramters = DeleteBuilder.Parameters == null ? null : DeleteBuilder.Parameters.ToArray();

            RestoreMapping();
            AutoRemoveDataCache();
            Before(sql);
            var result = Db.ExecuteCommand(sql, paramters);

            After(sql);
            return(result);
        }