EFCore禁用实体跟踪
C# 全选
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
//默认禁用实体跟踪
optionsBuilder = optionsBuilder.UseQueryTrackingBehavior(QueryTrackingBehavior.NoTracking);
base.OnConfiguring(optionsBuilder);
}
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网