I am using a action called scrap as
public ActionResult Scrap()
{
var webGet = new HtmlWeb();
var document = webGet.Load(Url);
var wikians = from info in document.DocumentNode.SelectNodes("//div[@id='results']")
from link in info.SelectNodes("p//a").Where(x => x.Attributes.Contains("href"))
from content in info.SelectNodes("p").Where(y => y.HasAttributes != true)
select new
{
LinkURL = link.Attributes["href"].Value,
Text = content.InnerText
};
return View();
}
Now I want to show all LinkURL and Text in view. For that I tried to use a model called WikiModel as
public class WikiModel
{
public string url { get; set; }
public string content { get; set; }
}
Now how can I go further so that I can show all infomation in my view. We can do so using the wikimodel
but how to add all scrap
action's data in this wikimodel
? I don't know how to manipulate his select new
of LINQ
to save data in model.