Example #1
0
        /*-------------------------------------------------------------*/

        /// <summary>
        /// Inserter 便捷 InsertBatch 方法
        /// </summary>
        public static int InsertBatch <M>(this XConnection conn, IEnumerable <M> mList)
            where M : class, new()
        {
            return(conn.Inserter <M>().InsertBatch(mList));
        }
Example #2
0
        /*-------------------------------------------------------------*/

        /// <summary>
        /// Inserter 便捷 Insert 方法
        /// </summary>
        public static int Insert <M>(this XConnection conn, M m)
            where M : class, new()
        {
            return(conn.Inserter <M>().Insert(m));
        }
Example #3
0
 /// <summary>
 /// Inserter 便捷 InsertBatchAsync 方法
 /// </summary>
 public static async Task <int> InsertBatchAsync <M>(this XConnection conn, IEnumerable <M> mList)
     where M : class, new()
 {
     return(await conn.Inserter <M>().InsertBatchAsync(mList));
 }
Example #4
0
 /// <summary>
 /// Inserter 便捷 InsertAsync 方法
 /// </summary>
 public static async Task <int> InsertAsync <M>(this XConnection conn, M m)
     where M : class, new()
 {
     return(await conn.Inserter <M>().InsertAsync(m));
 }