在不同模型控制器中,一个模型的DBSET对象
MVC框架的新手。当我尝试通过不同模型控制器中一个模型的DBSET对象传递DBSET对象时,我会低于错误。
以下是代码
public ActionResult Create()
{
return View(db.designations.ToList());
}
创建动作是员工模型的,其中db.designation.tolist()属于名称模型。
New to MVC framework. I am getting below error when i am trying to pass dbset object of one model in controller of different model.
below is the code
public ActionResult Create()
{
return View(db.designations.ToList());
}
Create action is of employee model where as db.designation.tolist() belongs to designation model.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论