i want to change record's in result of linq query. how?
my query :
var results = (from myTable in db.MyTable
where //some condition here
orderby myTable.Count descending
select new QueryResult()
{
Title = files.Title,
}).AsQueryable();
after performing query, i want to change Title property of QueryResult on e开发者_如何学Cach record, but i don't know how?
results = results.???
just use a foreach on results
To update the LINQ result using FOREACH loop, I first create local ‘list’ variable and then perform the update using FOREACH Loop. The value are updated this way.
精彩评论