Fix: Unable to Create an Object of Type 'ApplicationDbContext'

preview_player
Показать описание
Fix: Unable to Create an Object of Type 'ApplicationDbContext',
Рекомендации по теме
Комментарии
Автор

For me it led to a different error: No database provider has been configured for this DbContext. A provider can be configured by overriding the 'DbContext.OnConfiguring' method or by using 'AddDbContext' on the application service provider. If 'AddDbContext' is used, then also ensure that your DbContext type accepts a DbContextOptions<TContext> object in its constructor and passes it to the base constructor for DbContext.

lukesky
Автор

THANK YOU MUCH, I WAS TRYING TO SOLVE THE PROBLEM

selinarrs
Автор

Thank you very much, I didn't know what else to do

CarlosA
Автор

thank you, you have saved me! step by step check helped me, I missed the configuration in the Program.cs (builder.Services)

halivudestevez
Автор

OMG! Thank you very much, you're amazing!!! I was trapped in this error for days!

sarad.cinanima
Автор

THANK YOU SO MUCHH, IT WAS STUPID MISTAKE IN CONNECTION STRING, INSTEAD OF TYPING DATABASE:"NAME_OF_DATABASE" I TYPED DATEBASE....

toplists