score:1
I think the problem is not on the Update method but here "DataContext.Users.Where(p => p.ID.equals(user.id)).FirstOrDefault()", you are using FirstorDefault() and linq is returning only the first of the records. try removing FirstOrDefault() and saving the results on an Array...
Source: stackoverflow.com
Related Query
- Linq To Sql: Relations not correctly updated
- SQL Server Database is not updated via C# Code
- Constant Expression in Linq to SQL is not correctly compiled
- Sql Server table not updated with LINQ
- What can I do to resolve a "Row not found or changed" Exception in LINQ to SQL on a SQL Server Compact Edition Database?
- How are people unit testing code that uses Linq to SQL
- LINQ OrderBy is not sorting correctly
- How to add field not mapped to table in Linq to Sql
- LINQ to SQL query not returning correct DateTime
- LINQ to SQL does not update when data has changed in database
- LINQ to SQL in and not in
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- Linq "Could not translate expression... into SQL and could not treat it as a local expression."
- SQL Query to LINQ syntax using not exist and join
- LINQ SQL query check if a object field is not null
- Linq OrderBy not sorting correctly 100% of the time
- LINQ expression is not being translated to SQL
- LINQ not executed correctly
- LINQ Source Code Available
- Linq To SQL - Specified cast is not valid - SingleOrDefault()
- Linq to SQL update not working using Repository pattern
- Refactor Linq code and "LINQ to Entities does not recognize the method"
- linq - how do you do a query for items in one query source that are not in another one?
- How do I identify which Linq functions will not call to sql multiple times?
- LINQ: Relations do not get updated after SubmitChanges and Refresh
- Using delete on a LINQ to Sql Data Context with an Interface - 'Interface is not mapped as a table'
- How to code the partial extensions that Linq to SQL autogenerates?
- SQL OrderBy clause for alphanumeric data in LINQ not sorting as expected
- Changes(update) not commited to multiple columns using LINQ to SQL
- Determine the source DataContext for a Linq to Sql query
More Query from same tag
- How to trim more spaces of data base data using linq to sql query?
- LINQ: use Expression inside Where with anonymous type
- Custom OrderBy extension method fails while projecting anonymous type
- selecting some specific xml elements to list of anonymous objects
- Ignoring case in Linq.Any, C#
- Performing a right outer join with a group by using linq
- how to return back list of data from controller to knockout function to view page
- Fetching an XML using LINQ
- Grouping rows in a DataTable by column, then summing the contents of other columns in that group
- Limit collection by enum using lambda
- C# list -Eliminate Duplicate items by comparing specific properties
- How to create a delete LINQ command please from the enclosed Delete SQL?
- Building a Dynamic Linq Query using Equals and an Array
- XML to Linq Element in Descendants getting object ref error when selecting by attribute
- Typecast each object in an array on a single line of code, using LINQ
- Left Outer Joins with Linq extension methods?
- How can convert a For statement into LINQ
- Linq expression where clause with generic type
- LINQ querying complex many to many entities
- LINQ (or) Using processing in loop? What to choose?
- Get range of dates for movie rental
- How can I sort my Linq list?
- select in select with Linq
- How can I combine these two queries?
- Overloading Linq Except to allow custom struct with byte array
- query conversion is giving can not convert error in linq to sql
- Calling a UDF in LINQ without "dbo" database user
- Linq groupby and global count (not count per group)
- List is empty after linq operation
- Expression<Func> method gives convertion error when used in linq query