using TEntityContext context = new TEntityContext();
                //foreach(var record in listRecords)
                //{
                //}
                context.Set<T>().AddRange(listRecords);
                //context.AddRange(listRecords);
                context.SaveChanges();

  

相关文章: