Browse Source

修改追踪

zhuhao 2 năm trước cách đây
mục cha
commit
ec2a8340c0
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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 =>
             {