you can structure linq similar to how you'd structure sql. through a combination of where and foreach you should be able to update all the rows you need. i.e:

    instance.userinfoes.where(it => it.userid == 313).tolist()
                           it => it.interest = 0.98m

there's not really any way to write sql-like queries as text and pass them to regular linq as far as i know.

see this question for more solutions: update all objects in a collection using linq


your predicate should just be the where part of the query (a predicate just returns true or false). try this:

instance.userinfoes.where(user => user.userid == 313).first().interest = 0.98;

Related Query

More Query from same tag