public void saveLacCellBvciETLDocumentSet(string sqlconn) { TcpDbContext context = null; try { context = new TcpDbContext(sqlconn); context.Configuration.AutoDetectChangesEnabled = false; int count = 0; LacCellBvciETL lcbs = new LacCellBvciETL(); foreach (var cell in lcbs.mongo_LacCellBvciETL.QueryMongo()) { ++count; context = context.AddToContext(context, cell, count, bulksize, true, sqlconn); } context.SaveChanges(); } finally { if (context != null) context.Dispose(); } Console.WriteLine("LacCellBvciETLDocument->TcpDbContext->ok"); }
public void saveLlcTlliSessionDocumentSet(string sqlconn) { TcpDbContext context = null; try { context = new TcpDbContext(sqlconn); context.Configuration.AutoDetectChangesEnabled = false; int count = 0; LlcTlliSessionStaging tls = new LlcTlliSessionStaging(); foreach (var llc in tls.mongo_LlcTlliSessionStaging.QueryMongo()) { ++count; context = context.AddToContext(context, llc, count, bulksize, true, sqlconn); } context.SaveChanges(); } finally { if (context != null) context.Dispose(); } Console.WriteLine("LlcTlliSessionDocument->TcpDbContext->ok"); }