我有一个员工和团队之间的多对多关系.
Foreach实体我有一个存储库.
Foreach实体我有一个存储库.
现在我使用ASP.NET MVC和我创建了一个EmployeeController.我还创建了一个视图来编辑员工.对于这个视图,我需要一个DropDownList与所有团队.问题是我的EmployeeController只有EmployeeRepository.那么我怎么能得到所有的团队?
我现在的解决方案是使用两个存储库.
解决方法
是的,控制器完全可以接受两个存储库的引用.
事实上,我的控制器多与多个存储库进行工作.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。