I need to add data to view model using LINQ My view model is :
public class SearchScrapViewModel 
{ 
public WClass wClass{get; set;} 
public SClass sClass{get; set;} 
public YClass yClass { get; set; } 
} 
public class WClass 
{ 
public string title { get; set; } 
public string link { get; set; } 
} 
public class SClass 
{ 
public string title { get; set; } 
public string link { get; set; } 
} 
public class YClass 
{ 
public string title { get; set; } 
public string link { get; set; } 
}
and i need to use these 3 classes with 3 different LINQ query and then pass data to return View(SearchScrapViewModel);
var wikians = //LINQ Logic 
select new SearchScrapViewModel 
{ 
wClass.link = link.Attributes["href"].Value, //Error: I am not able to add to wClass 
wClass.title = link.InnerText 
}; 
and similarly to other classes
and then pass to return View(SearchScrapViewModel); so that i can access all the 3 classes in View of this controller
How to do that?
 
     
     
     
    