T
Tony Johansson
Hello!
Below is a collection named result.
Each object in the collection is called worksheetRowParameter.
I have written a linq query but I want to have it modified a little.
In this query
var slask = from o in result
where o.Parameter.ToUpper() == paramProperty
select new {o.Value, o.WorksheetRowID};
I only wants those rows(objects) returned where I have identical rows for
parameter LS.
In my case I only want the linq query or lambda expression to return these
two rows.
114 LS 2-5003
113
123 LS 2-5003
122
So rather want to have a lambda expression but it will do with a linq quesry
as well.
Here is the collection named result
***************************
ID Parameter Value WorksheetRowID
96 LS 2-121 95
97 SLC 0
95
98 PARMG 0 95
102 ACL A1 95
105 LS 2-150 104
106 SLC 0
104
109 SLI 250
104
111 ACL A2
104
114 LS 2-5003
113
115 SLC 0
113
116 PARMG 0 113
117 ST "C7ST2C-57" 113
120 ACL A1
113
123 LS 2-5003
122
124 SLC 1
122
125 PARMG 0 122
126 ST C7ST2C-56 122
129 ACL A1
122
//Tony
Below is a collection named result.
Each object in the collection is called worksheetRowParameter.
I have written a linq query but I want to have it modified a little.
In this query
var slask = from o in result
where o.Parameter.ToUpper() == paramProperty
select new {o.Value, o.WorksheetRowID};
I only wants those rows(objects) returned where I have identical rows for
parameter LS.
In my case I only want the linq query or lambda expression to return these
two rows.
114 LS 2-5003
113
123 LS 2-5003
122
So rather want to have a lambda expression but it will do with a linq quesry
as well.
Here is the collection named result
***************************
ID Parameter Value WorksheetRowID
96 LS 2-121 95
97 SLC 0
95
98 PARMG 0 95
102 ACL A1 95
105 LS 2-150 104
106 SLC 0
104
109 SLI 250
104
111 ACL A2
104
114 LS 2-5003
113
115 SLC 0
113
116 PARMG 0 113
117 ST "C7ST2C-57" 113
120 ACL A1
113
123 LS 2-5003
122
124 SLC 1
122
125 PARMG 0 122
126 ST C7ST2C-56 122
129 ACL A1
122
//Tony