EF批量添加数据之修改SQL Server执行上限

asp.net core 项目

打开Startup.cs

services.AddDbContext<MyContext>(
                options => {
                    options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection"),
            opts=> { opts.MaxBatchSize("你随便")});//这里是int类型 //敏感数据记录 options.EnableSensitiveDataLogging(true); });

 

posted @ 2019-02-18 17:06  sunshuaize  阅读(389)  评论(0编辑  收藏  举报