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"

1 comment:

  1. 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

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...