소스 검색

修改追踪

zhuhao 2 년 전
부모
커밋
ec2a8340c0
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      IMCS_CCS/Startup.cs

+ 2 - 1
IMCS_CCS/Startup.cs

@@ -54,7 +54,8 @@ namespace IMCS.CCS
             });
 
             //ʹÓÃmysql 
-            services.AddDbContext<CcsContext>(options => options.UseMySQL(Configuration.GetConnectionString("mysqlContext")));  
+            services.AddDbContext<CcsContext>(options => options.UseMySQL(Configuration.GetConnectionString("mysqlContext"))
+                                                                 .UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking));  
 
             services.AddCors(options =>
             {