C
C#14mo ago
Serene Sphinx

Saying error Interface is not accessible due to protection, but protection is public then why this e

I'm developing MVC app using Controllers and Models But showing this error: Istudentrepository is Public interface still showing it's protected why this error?
No description
No description
3 Replies
Angius
Angius14mo ago
GetAllStudents is not public though Also, you're instantiating the StudentRepository class, not getting a IStudentRepository injected
Pobiega
Pobiega14mo ago
Yeah the interface isn't involved at all here You should be registering the repo to the interface in your app builder, then inject the interface
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server