✅ In Identity Model class i am having CS1729 coded error message.
Hi, I am trying to build a simple library management system using asp.net but Identity Model is giving me CS1729 error, I googled but couldn't find a solution to it. I have added my "Books" class and "Identity Models" to attachments, could you please give me a tip about how can I solve this error. ( I tried to write it as "public ApplicationDbContext() : base("DefaultConnection", false)" and "public ApplicationDbContext() : base("DefaultConnection")" but in that case gave me other errors as well.) Thank you.
10 Replies
I mean, the error is quite clear here
DbContext
constructor does not take two arguments
What would this throwIfv1Schema
do, if it existed?Takes connection string
After deleting it it says this whenever I try to add MVC controler with views using entity framework
And I cannot add my model and DBContext Classes to controllers
You need to either register the DbContext as a service or override OnConfiguring.
Take a look at the documentation here:
https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=visual-studio
or
Getting Started - EF Core
Getting started tutorial for Entity Framework Core
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
@TeBeCo thank you so much
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
If you have no further questions, please use /close to mark the forum thread as answered
Documentation helped tbh