fix
This commit is contained in:
@@ -37,10 +37,17 @@ public class AppDbContextFactory : IDesignTimeDbContextFactory<AppDbContext>
|
||||
throw new NotSupportedException($"No such provider: [{provider}]");
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
|
||||
builder.EnableSensitiveDataLogging(true);
|
||||
builder.EnableDetailedErrors(true);
|
||||
|
||||
#endif
|
||||
|
||||
var db = new AppDbContext(providerEnum, builder.Options);
|
||||
db.ChangeTracker.AutoDetectChangesEnabled = false;
|
||||
db.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
|
||||
|
||||
|
||||
return db;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user