asp.net mvc - MVC Viewmodel cant access model with View -
how can access viewmodel view? code follows:-, i have 2 models (using entity framework) have view model of:- public class viewmodelstory { public ienumerable<tbl_gcb_newsitem> gcb_newsitem { get; set; } public ienumerable<tbl_gcb_itemcomment> comemnts { get; set; } } my contoller populates models by:- viewmodelstory.gcb_newsitem = (from in db.tbl_gcb_newsitem i.intitemidentifier.tostring() == storyid select i).singleordefault(); viewmodelstory.comemnts = (from in db.tbl_gcb_itemcomment i.intitemidentifier.tostring() == storyid select i).tolist<tbl_gcb_itemcomment>(); i return model by return partialview("newsstory", viewmodelstory); then in view have following declaration @model viewmodelstory @using gcbsmvc.models to access model have tried various linq , directly querying model, nothi...