Using ApplicationDbContext in Repository Pattern

I want to implement repository pattern in my ASP.NET MVC project. I’ve seen a lot of implementations when searching google and I’m a little bit confused. Most of them created their own Context class which inherited from DBContext class and then injected it in a repository (or repositories) constructor.
None of the articles I found explain why the custom DBContext class is created and why they just don’t use default ApplicationDbContext and HOW to change your app code to adapt to the new Context class. They don’t even mention the class.

Can’t login after adding configure application cookies

I’m developing Asp.Net Core 3.1 MVC web application with Identity. My login page works fine but after adding the services.ConfigureApplicationCookie it not worked as expected and it keeps redirecting me to my local index. I can’t figure out what really happen. If I comment this block, everything works as expected.

Compare password of current user with model property?

This might be a really dumb question (I’m new to ASP.NET). Anyways, I’m making a web application for practice that will manage students and their courses of a school. The information of the student’s courses, student id number, name, grade etc. will be stored on Student objects in the database. When an admin adds a … Read more