コード例 #1
0
 /// <summary>
 ///     Bulk copies (inserts) the <see cref="IEnumerable{T}" /> into the database.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="args"></param>
 /// <returns></returns>
 public static async Task BulkCopy <T>(IEnumerable <T> args) where T :
 class,
 IKaguyaQueryable <T>
 // IKaguyaUnique<T> may be necessary, but we'll see.
 {
     using (var db = new KaguyaDb())
         await Task.Run(() => { db.BulkCopy(args); });
 }