EF —— 添加数据集

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

  

posted @ 2020-05-15 15:28  PanPan003  阅读(286)  评论(0编辑  收藏  举报