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() .foreach( 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;
- How to update column data using sql query in linq?
- How to Update previous row column based on the current row column data using LinQ
- how to insert data in 1 table and update another table in a sql database using linq
- how to fetch data from database using linq query for relationship 1:N and N:N (between 3 entity) in asp.net mvc EF code first?
- How to update column value using LINQ Query
- How can I write the following code more elegantly using LINQ query syntax?
- How to use expressions to build a LINQ query dynamically when using an interface to get the column name?
- How to get SQL query into LINQ form in C# code
- Pull data from multiple tables in one SQL query using LINQ and Entity Framework (Core)
- Using LINQ query result for data source for GridControl c#
- How can I issue a LINQ query to a SQL Server to check if a column value starts with a word?
- how to get two column values in a single query using linq to entities
- Updating LINQ to SQL but the query i have is from a join? Can't update using query that uses a join?
- How can I check the number of calls to the database in LINQ query when using .NET Core and Code First?
- How to take driver id column using this linq query
- How to check comma separated values stored in data base column having the given value using linq in c#
- How to write linq query from sql query using LINQ?
- How to filter related data using Entity Framework and LINQ to SQL and LinqKit PredicateBuilder Or IdeaBlade DevForce
- How do I check if a SQL Server 2005 TEXT column is not null or empty using LINQ To Entities?
- LINQ - database query using "into", how do I reference data prior to "into" in the select clause?
- How to display filtered data in asp.net using linq to sql
- Retrieve data using Dynamic Query and Linq to SQL
- How to use c# to perform summing data with type conversion from SQL using LINQ
- How to retrieve data using Linq Query
- How to display all row data rather than just diplaying first row using SQL Query in MVC
- How can I move on column data to another column in the same row using linq
- How to check linq query result against Sql Server Database for data already exist or not?
- How to group an SQL date column stored as int as Year Month using LINQ
- How to get data of atleast one id match using linq query in c#
- How to update my model code using LINQ
More Query from same tag
- Using A Parametr (string) in LINQ
- How to order by concatenated values in Entity Framework / Linq?
- Populate List<string> with the same value with LINQ
- return dynamic object with all child nodes as Json in - error: cannot use a lambda expression as an argument to a dynamically dispatched
- How can I set up a conditional C# if statement and LINQ where statement?
- How do I get the departmentName alongside the employees first and last names in the combobox?
- EntityFunctions.AsNonUnicode equivalent for .NET Core
- Populate class instance by enum using linq
- counting occurrences of end of line
- In Linq, what is the opposite of .Select()?
- c# linq Query how to write multiple And condition
- Linq update and merge two result sets (from data tables)
- How can I subtract two dates and get a new date converted in minutes?
- Linq To SQL caching VS multi-user application
- Specify count column with left outer join in linq
- How to get type of group by query?
- LINQ group one type of item
- Entity Framework Error Deleting Objects With Foreign Keys
- Find distinct elements from List<List<String>>
- Parallel LINQ GroupBy taking long time on systems with high amount of cores
- LINQ to Entities and creating a new instance of an entity
- Adding N conditions to a LINQ query?
- Using a type alias in a linq statement is generating an error
- Get results of group by and add to multiple lists c#
- Index out of range. Can't get selectedIndexChanged as index for query
- Combining join and select statement in LINQ to SQL
- How to use ContainsAll in MongoDB
- update xml using linq in c#
- Map List by Linq Expression
- Entity Framework Linq update data not working