Ejemplo n.º 1
0
        /// <summary>
        /// 刪除多筆資料
        /// </summary>
        public virtual int Delete(Dictionary <string, object> equals)
        {
            var cmd = SqlCommandHelper.GenerateDelete(CSharpHelper.GetTableName <T>(), equals);

            return(SqlHelper.ExecuteNonQuery(cmd));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 刪除多筆資料
        /// </summary>
        public virtual int Delete(string where, params SqlParameter[] parameters)
        {
            var cmd = SqlCommandHelper.GenerateDelete(CSharpHelper.GetTableName <T>(), where).AddParameters(parameters);

            return(SqlHelper.ExecuteNonQuery(cmd));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 更新多筆資料
        /// </summary>
        public virtual int Update(Dictionary <string, object> update, string where, params SqlParameter[] parameters)
        {
            var cmd = SqlCommandHelper.GenerateUpdate(CSharpHelper.GetTableName <T>(), update, where).AddParameters(parameters);

            return(SqlHelper.ExecuteNonQuery(cmd));
        }