Is it possible to set property on each element from List using LINQ.
for example:
var users = from u in context.Users where u.Name == \"George\" sele
Looks dirty but if asked (just via select), I'll do it this way
var users = from u in context.Users where u.Name == "George"
select new User()
{
prop1 = u.prop1,
prop2 = u.prop2,
prop3 = true // update like here
};
if you wish to use some other C# function, you can also use linq functions and work on IEnumerable type of lists.
var users = context.Users.Where(u => u.Name == "George").ToList()
.Select(p => new User()
{
prop1 = p.prop1,
prop2 = p.prop2,
prop3 = ComputeHash(p) // update like here
});
Code above becomes IEnumerable because of the .ToList()
prior to the .Select()