Ralms.EntityFrameworkCore.Extensions
Ralms.EntityFrameworkCore.Extensions copied to clipboard
[WRN] More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework
I use your extensions to support the functionality of the hints in my app. But after some time EF starts to write the following messages to the logs:
More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. This is commonly caused by injection of a new singleton service instance into every DbContext instance. For example, calling UseLoggerFactory passing in a new instance each time--see https://go.microsoft.com/fwlink/?linkid=869049 for more details. Consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built.
If I disable registration of RalmsExtendFunctions() then the warning in the logs disappears.
The code for the DbContext configuration looks like this:
services.AddDbContext<DbContext>(options =>
options
.UseSqlServer("connection string")
.RalmsExtendFunctions());
Same problem
@ralmsdeveloper is there any news on this issue?
@unknownuser90 I'm sorry, I've been very busy these days with company projects, I'll take some time out this week to update all my issues here.
Thank you!
I will test if the fix for this problem has been fixed: https://github.com/aspnet/EntityFrameworkCore/issues/12927
Is there any new information?
@ralmsdeveloper is there any news?
yea. I corrected, sorry for the delay I have been very involved with the things of the company.
I will try to update the package until late afternoon.
I will try to update the package until late afternoon.
@ralmsdeveloper is there any news?