My apologies for the incomplete question, but you came close to what I want.
Alright, here's what I need to do:
I have a Typedview that I want the controller to load in the index method. When I right click in the Index method and say 'Add View', I get the following options:
ItemMasterPrototype.Data.TypedViewClasses.PrototypeProductLineRow
and
ItemMasterPrototype.Data.TypedViewClasses.PrototypeProductLineTypedView
(I have added the sql view as a TypedView only.)
Which one do I select?
Here's my controller:
private readonly PrototypeProductLineTypedView prototypeProductLineTypedView;
public ProductLinesController()
{
prototypeProductLineTypedView = new PrototypeProductLineTypedView();
prototypeProductLineTypedView.Fill();
}
//
// GET: /ProductLines/
public ActionResult Index()
{
return View(prototypeProductLineTypedView);
}
If I select the PrototypeProductLineTypedView, I get the fields like Count, CaseSensitive, IsInitialized and so on in the index.aspx page.
If I select the PrototypeProductLineRow, I get the correct fields to be populated in the index.aspx page, but I'm having a type casting issue as I'm passing a PrototypeProductLineTypedView and the view expects as PrototypeProductLineRow.
What am I missing?
Thanks
Arun