exception when start project with UseChangeTrackingProxies = true
philong2106 opened this issue · 2 comments
philong2106 commented
I configure sqlserver in code
services.AddDbContext<DbContext>(builder =>
builder
#if DEBUG
.EnableSensitiveDataLogging(true)
.EnableDetailedErrors(true)
.UseLoggerFactory(LoggerFactory)
#endif
.UseLazyLoadingProxies(true)
.UseSqlServer(connectionStrings,
sqlServerOptions =>
{
sqlServerOptions.CommandTimeout(200);
sqlServerOptions.AddBulkOperationSupport();
}
)
);
when i connect sqlServer then throw exception
Entity type 'Thinktecture:TempTable:Thinktecture.EntityFrameworkCore.TempTables.TempTable<DateOnly> (TempTable<DateOnly>)' is sealed. 'UseChangeTrackingProxies' requires all entity types to be public, unsealed, have virtual properties, and have a public or protected constructor. 'UseLazyLoadingProxies' requires only the navigation properties be virtual.
philong2106 commented
Explanation and solution: #49
I seen, Thank you very much!