With reference to query #10383 - Thank you for the reply to my question but i have a problem
Prerequisites What is your product version? 8.3 What is your product type (Angular or MVC)? MVC What is product framework type (.net framework or .net core)? .NET Core If issue related with ABP Framework What is ABP Framework version? 8.3
I am trying to intergare the EasyQuery reporting product into my Net Zero application but I have the following problem / question:
In Startup.cs class Easy query requires that the DB context be given in the Configure function like this:
endpoints.MapEasyQuery(options => { options.UseDbContext<MyDbContext>(services => new MyDbContext(...) }
How can Ido the new part seeing that aspnet zero uses IDbcontextProvider to get the dbcontext?
Your reply ismcagdas created 4 days agoSupport Team Hi,
You can solve this problem like this;
Add the code block below into Initialize Method of *WebHostModule.cs class;
Configuration.IocManager.IocContainer.Register(Component .For(typeof(DbContextOptions<EqTestProjectDbContext>)).UsingFactoryMethod((kernel, context) => { var builder = new DbContextOptionsBuilder<EqTestProjectDbContext>(); builder.UseSqlServer(Configuration.DefaultNameOrConnectionString); return builder.Options; }));
My question
I cannot finf the module WebHostModule.cs anywhere in the solution. Should I add one? To which project? What should it look like?
Thankyou for your help so far REgard Chris