I can\'t figure out what\'s going on with this error:
The model item passed into the dictionary is of type \'System.Collections.Generic.List1[Repository
In the top of your Index.cshtml
view replace:
@model RepositoryExample.Models.IEmployeeManagerRepository
with:
@model IEnumerable<RepositoryExample.Employee>
The _repository.ListEmployees()
method returns IEnumerable<Employee>
and that's what you are passing to the view here:
return View(_repository.ListEmployees());
So that's the type you should be using in the @model
directive in your view.