我是mvc的新手,正试着通过做一个小项目来学习它。我有一个页面,应该显示特定日期的货币和天气。所以我需要传递货币模型和天气模型。我已经成功传递了货币模型,但我不知道如何传递第二个模型。大多数教程只展示如何传递一个模型,请问你们能给一个想法吗?
这是我的当前控制器动作,它发送货币模型:
public ActionResult Index(int year,int month,int day)
{
var model = from r in _db.Currencies
where r.date == new DateTime(year,month,day)
select r;
return View(model);
}