My model:
public class Event
{
public string DateOfEvent { get; set; }
public string Teams { get; set; }
public string Championship { get; set; }
}
DateOfEvent and Teams I parse from table with this code:
var matches = currentData.DocumentNode.SelectNodes("//tr[@class=' event-header']").
Select(tr => new Event()
{
DateOfEvent =
tr.SelectNodes("./td[1]/table/tr[1]/td[2]//text()[normalize-space()]")
.Single()
.InnerText.Trim(),
Teams = tr.SelectNodes("./td[1]/table/tr[1]/td[3]//text()[normalize-space()]")
.Single()
.InnerText.Trim(),
});
I have many records with DateOfEvent and Teams. But I need to add to these all records Field Championship, but Its field parse not from table.
var b = currentData.DocumentNode.SelectNode("//div[@class ='sport-champ']")
.Select(p=> new Event()
{
Championship = ......
});
How can I do that?