Group by "s", instead of "sample". Then you can select the data as you need it: var enumerable = from s in sample group s by new { s. ParameterID, s.
MaterialID, s. ProductID, } into GroupedSample select new { GroupedSample.Key. ParameterID, GroupedSample.Key.
MaterialID, GroupedSample.Key. ProductID, TotalQuantity = GroupedSample. Sum(gs => gs.
Quantity) }.
Thanks that worked. – Nev_Rahd Jun 11 '09 at 0:11.
The term "LINQ to Objects" refers to the use of LINQ queries with any IEnumerable or IEnumerable collection directly, without the use of an intermediate LINQ provider or API such as LINQ to SQL or LINQ to XML. You can use LINQ to query any enumerable collections such as List, Array, or Dictionary. The collection may be user-defined or may be returned by a .
NET Framework API. In a basic sense, LINQ to Objects represents a new approach to collections. In the old way, you had to write complex foreach loops that specified how to retrieve data from a collection.
In the LINQ approach, you write declarative code that describes what you want to retrieve. They are more concise and readable, especially when filtering multiple conditions. They provide powerful filtering, ordering, and grouping capabilities with a minimum of application code.
They can be ported to other data sources with little or no modification. In general, the more complex the operation you want to perform on the data, the more benefit you will realize by using LINQÂ instead of traditional iteration techniques. The purpose of this section is to demonstrate the LINQ approach with some select examples.
It is not intended to be exhaustive.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.