I just added Ninject dependency injection into my code, and after righting the constructor I am getting the following error on my Constructor:
Inconsistent accessibility: parameter type 'Final.Models.IUserRepo' is less accessible than method 'Final.Controllers.HomeController.HomeController(Final.Models.IUserRepo)' C:\Users\Ali\Documents\Final\Final\Controllers\HomeController.cs 17 16 Final
Following is my HomeController
public class HomeController : Controller
{
IUserRepo repo;
public HomeController(IUserRepo u)
{
u = repo;
}
}
Here is my interface:
namespace Final.Models
{
interface IUserRepo
{
void save(User u);
}
}
I tried changing all the methods to public but nothing worked.
repo = u, notu = repo;- user3559349