score:1
Accepted answer
typesymbolssettingsdata = symbolsettings
.groupby(p => p.symboltype)
.todictionary(
p => p.key,
p => p.select(x => new symboldescr
{
symbol = x.symbolname,
classification = (int)x.symbolclassification
})
.tolist());
Source: stackoverflow.com
Related Query
- Creating a dictionary from another dictionary using LINQ
- Remove Single Quotes From All Cells in a DataTable - Creating New Table - Using LINQ in Vb.Net
- Creating hierarchical JSON result from multiple tables using linq expression
- Creating JSON object from Ienumerable using LINQ
- Creating Dict<enum, List<objec>> from List<object> using LINQ C#
- Creating sub lists with objects of the same attribute from a list using LINQ
- C# + Deedle: Creating a Data Series with Continuous DateTime Keys from Another with Date Gaps using LINQ
- Using LINQ to remove elements from a List<T>
- How can I filter a dictionary using LINQ and return it to a dictionary from the same type
- How to select values within a provided index range from a List using LINQ
- How to get first object out from List<Object> using Linq
- Creating a LINQ select from multiple tables
- How to select multiple values from a Dictionary using Linq as simple as possible
- How to remove duplicates from collection using IEqualityComparer, LinQ Distinct
- Get indexes of all matching values from list using Linq
- How do I convert from a Dictionary to a SortedDictionary using LINQ in C#?
- Create a list of one object type from a list of another using Linq
- Remove instances from a list by using LINQ or Lambda?
- Take the first five elements and the last five elements from an array by one query using LINQ
- Select distinct values from a list using LINQ in C#
- Remove items from list that intersect on property using Linq
- Simplest way to filter value from generic List in C# using LINQ
- Using Linq to remove from set where key exists in other set?
- Get Value from key using linq
- How do I remove items from generic list, based on multiple conditions and using linq
- Exclude a column from a select using LINQ
- Using LINQ to parse the numbers from a string
- Remove item from list using linq
- Get X random elements from table in database using Linq or lambda in C#
- Create Items from 3 collections using Linq
More Query from same tag
- Like methods for integer field in LINQ query
- Linq count and sum in join
- LINQ Compare two lists where property value is not equal
- Using Linq, how to GroupBy against objects in a list within the target object
- ASP.NET MVC 4 Want to populate dropdown list from database
- Query to select worst-selling products
- Left join using between clause linq
- Pivot DataTable with Unknow number of columns
- Efficient linq query to return objects when you have a list of object id's
- How to sum values for multiple columns in DataTable using Groupby with Linq
- Linq to return list with calculated sums based on property
- Make a list of lists a list
- How can I use my model properties in a Linq query?
- How to shape the results returned by dynamic join
- Linq Choose Where Specific Column Has Value
- How to write this LINQ Query in a better way
- Linq Sub Query is not working
- Using ==Null in Linq not working to find null values
- Entity Framework Generates different queries on different workstations
- Linq select group by where syntax
- C# Array.FindIndex index of current object
- using variable in linq group by clause
- How to build a filter with LINQ
- Access the value of a member expression
- Entity Framework - LINQ - Dynamic Column Names
- Can you simplify this linq-to-entity groupBy query?
- Concatenate two strings in an array using LINQ
- How do I sort strings alphabetically while accounting for value when a string is numeric?
- Using Linq-to-XML to insert, with threading
- How to use LINQ to fetch a list of items that differ in one property?