I am creating a mvc project to learn Repository pattern. i am using DBFirst approach + Entity Framework + Unity for DI. I am following this article:
I have followed this article and it's working fine. But after it I
created a new table in database Teacher and update the database
Later I add TeacherInfoRepository, In unityconfig file registered the TeacherInfoRepository
Add controller and then add view
I performed above steps as it is defined in the article I mentioned above. But after I tried running /Teachers/Index view It gives the error:
The property context on type ProjectName.Repositories.TeacherInfoRepository is not settable.
I searched on google but unfortunately didn't find something like this.
Please guide me. Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire