Exemplo n.º 1
0
        //====================================================================
        //新增 INSERT
        //====================================================================

        #endregion "新增 INSERT"

        /// <summary>
        /// 新增 (條件式結束語句)
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="model"></param>
        /// <param name="dao"></param>
        /// <param name="conn"></param>
        /// <param name="trns"></param>
        /// <returns></returns>
        public static int Insert <T>(this T model, IDBUtil dao,
                                     DbConnection conn = null, DbTransaction trns = null) where T : IDBEntity
        {
            //Insert
            return(dao.Insert(model, model.GetTableName(), conn, trns));
        }