I have a many-to-many assocition between an Employee and a Team. Foreach entity I have a repository.
Now I use ASP.NET MVC and I created a EmployeeController. I also created a View to edit an Employee. For this view I need a DropDownList with all Teams. The problem is that my EmployeeController only has got EmployeeRepository. So how can I get all Teams? My solution now is to use two repositories.
But is this a good solution?
Could I instead create TeamController and write a method returning all Teams (how would I do that)?