DrinkAndGo | simple eCommerce App build on top of Asp.Net Core MVC | Model View Controller library
kandi X-RAY | DrinkAndGo Summary
kandi X-RAY | DrinkAndGo Summary
A simple eCommerce App build on top of Asp.Net Core MVC framework.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DrinkAndGo
DrinkAndGo Key Features
DrinkAndGo Examples and Code Snippets
Community Discussions
Trending Discussions on DrinkAndGo
QUESTION
...InvalidOperationException: Cannot resolve scoped service 'DrinkAndGo.Data.AppDbContext' from root provider. DrinkAndGo.Data.DbInitializer.Seed(IApplicationBuilder applicationBuilder) in DbInitializer.cs +13 AppDbContext context = DrinkAndGo.Startup.Configure(IApplicationBuilder app, IHostingEnvironment env) in Startup.cs +46 DbInitializer.Seed(app);
ANSWER
Answered 2018-Apr-18 at 05:57You can resolve the AppDbContext from the IServiceProviders GetRequiredService
method.
Add the IServiceProvider as a parameter to the Configure method in the Startup class and the runtime will injected it for you
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DrinkAndGo
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page