Esempio n. 1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <typeparam name="T">要删除的类型</typeparam>
        /// <param name="model">要删除的实体</param>
        /// <param name="ConStrName">链接字符串</param>
        /// <returns>影响的行数</returns>
        public static int Delete <T>(T model, string ConStrName = null)
        {
            TSQLModel tsqlM = TSQLManager.DeleteTSQL(model);

            return(ExecuteNonQuery(tsqlM.SQLStr, tsqlM.GetSQLParameters <SqlParameter>(), ConStrName));
        }
Esempio n. 2
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <typeparam name="T">要添加的类型</typeparam>
        /// <param name="model">要添加的实体</param>
        /// <param name="ConStrName">链接字符串</param>
        /// <returns>影响的行数</returns>
        public static int Insert <T>(T model, string ConStrName = null)
        {
            TSQLModel tsqlM = TSQLManager.InsertTSQL(model);

            return(ExecuteNonQuery(tsqlM.SQLStr, tsqlM.GetSQLParameters <SQLiteParameter>(), ConStrName));
        }