My personal journey through my Information Tech career, including solutions that I come across as I continue to learn!!
Monday, September 2, 2024
EF Core Error: Unable to create a 'DbContext' of type ''.
Mostly experienced when using Clean Architecture pattern in ASP.NET CORE projects. The resolution is very easy: Simply make sure that you explicitly indicate the Startup project. (Right-click on the Startup project, and select "Set as startup project"
Subscribe to:
Post Comments (Atom)
Today's Featured Post
Microsoft Office ImgMso Icon Downloads
Do you develop in Ms Office applications? Want Office ImgMso Icons to customize the Office ribbon? Here is the easiest to instal source of t...
-
EF Core Error: Unable to create a 'DbContext' of type ''. Mostly experienced when using Clean Architecture pattern in ASP.N...
-
While trying to view your API's with Swagger in ASP.NET Core, you might encounter this error . Solution: The problem can be caused b...
-
"Quick create form" does not pop-up when invoked from a sub-grid on Main form, instead, Main form is shown. Soln: Include the tabl...
Full error message: Unable to create a 'DbContext' of type ''. The exception 'Unable to resolve service for type 'Microsoft.EntityFrameworkCore.DbContextOptions`1[WhiteLagoon.Infrastructure.DataContext.AppDbContext]' while attempting to activate 'WhiteLagoon.Infrastructure.DataContext.AppDbContext'.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
ReplyDelete