Tag: select
How to select unique names from a List using LINQ in C#?
Below is a sample code snippet demonstrating on how to get unique or distinct names from a list in C# using LINQ query. How to select unique names from a List using LINQ in C#?
How to Update From Select Statement in SQL Server ?
Below is a sample query that demonstrates how to update a table by getting the data from the select query in SQL Server. Assume that there are 2 tables AbundantCodeEmployee and AbundantCodeDepartment which contains the id . The id(in department) in this example refers to the department head . The columns “DepartmentName” is updated in the query based on the value retreived . How to Update From…
How to select top 5 records from List using LINQ in C#?
Below is a sample code snippet demonstrating on how to select top 5 records from a list using LINQ in C# using the Take extension method… How to select top 5 records from List using LINQ in C#?