Closed geffzhang closed 5 years ago
HI,
could you put in a break here:
if (!optionsBuilder.IsConfigured)
{
optionsBuilder.UseSecondLevelCache(); // <---- here
}
It looks like UseSecondLevelCache
is never been called.
In your sample, you have to change the position of UseSecondLevelCache
.
[...]
services.Configure<AbpDbContextOptions>(options =>
{
options.UseMySQL();
options.UseSecondLevelCache() // add here for setup
});
}
WmpGatewayDbContext:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
// this would never be called because context is already configured
optionsBuilder.UseSecondLevelCache(); // can be removed
}
}
Describe what is not working as expected.
If you are seeing an exception, include the full exceptions details (message and stack trace).
Steps to reproduce
Use MySQL
Further technical details
EntityFrameworkCore.Cacheable version: 2.0.0 EF Core version: 2.2 IDE: Visual Studio 2017 15.9