Inconsistent Accessibility Error

  • Thread starter Thread starter Ivan I Gonzalez
  • Start date Start date
I

Ivan I Gonzalez

Guest
I have this piece of code here typed out but I cannot get this error on the line with the arrows "<--" to go away.

Its comes up with: Inconsisten accessibility: parameter type 'IProductRepository' is less accessible than method 'ProductController.ProductController(IProductRepository)'


public class ProductController : Controller
{
private IProductRepository repository;
public ProductController(IProductRepository repo) <------
{
repository = repo;
}
public ViewResult List() => View(repository.Products);
}

Continue reading...
 
Back
Top