I am trying to use two models in my view, but I am get an error saying that only one model can be used. I get the purpose of why only one model can be used but are there any workarounds so I could use two models in my view. I have listed the code below.
Controller:
/* Parts Method */
public ActionResult Parts()
{
return View(db.Part.ToList());
}
View:
@model Inventory_System.Models.Transaction @model IQueryable
The first model is for connecting to the view model and the second is connecting to a database list from the controller to be displayed. How could I use both of these models in the same view?