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 Articles
- Linq To Sql: Relations not correctly updated
- LINQ Source Code Available
- creating Linq to sqlite dbml from DbLinq source code
- source code for LINQ 101 samples
- Why is linq result updated, if a source is updated afterwards?
- c# Linq or code to extract groups from a single list of source data
- Convert string[] to int[] in one line of code using LINQ
- Code equivalent to the 'let' keyword in chained LINQ extension method calls
- Linq code to select one item
- How are people unit testing code that uses Linq to SQL
- LINQ OrderBy is not sorting correctly
- LINQ query to perform a projection, skipping or wrapping exceptions where source throws on IEnumerable.GetNext()
- Syntax to execute code block inside Linq query?
- Enumerable.Empty<T>().AsQueryable(); This method supports the LINQ to Entities infrastructure and is not intended to be used directly from your code
- Best open source LINQ provider
- Is there a good source that gives an overview of linq optimizations?
- Does this LINQ code perform multiple lookups on the original data?
- How to understand the following C# linq code of implementing the algorithm to return all combinations of k elements from n
- LINQ WHERE method alters source collection
- Where can I view LINQ source code?
- Suggestions for designing complex LINQ code
- Is there any way to create a LINQ query as a variable without having the data source (yet)?
- Left outer join using LINQ -- understanding the code
- How to pass LinQ Expressions from F# to C# code
- How to reuse a linq expression for 'Where' when using multiple source tables
- Avoiding code repetition when using LINQ
- Linq OrderBy not sorting correctly 100% of the time
- Using LINQ to delete an element from a ObservableCollection Source
- LINQ not executed correctly
- How does linq actually execute the code to retrieve data from the data source?
- Querying MongoDB with List of IDs using Lambda Expression
- Linq many to many include
- Does a DomainService load all entities before executing linq?
- How to convert the objects in a query result to custom type
- c#: New string array from two, where one has strings the other contains?
- linq jsonresult dropdownlist
- Trouble with a "simple" linq query
- How to get data related to a spesific user with JwtToken?
- linq select sum and average into view model
- How to delete a single row from database using linq query?
- Sort and allocate objects in a list
- c# IEnumerable<Object> LINQ GroupBy - Merge 2 Groups
- Linq query to select an item, with a parameter in a collection
- C# Generic.ForEach not work? or EF easy way to exclude properties
- How to write a LINQ query to do this
- Get data from multiple tables to an object with LINQ join
- How to get control with minimal area from array of controls?
- How to Perform an Action on results of .FindAll()
- How keys are reorganized after C# LINQ convert a dictionary to a query?
- C# LINQ GroupBy with NULL values