When i have a DataView Operation as
EnumerableRowCollection<DataRow> query
= from order in _table.AsEnumerable()
where order.Field<Int32>("key") > 2 && order.Field<Int32>("key") < 4
select order.Field<Int32>("key")=1000, order.Field<string>("name");
I can't form the above expression.
When i try
select new {key= 1000,name= order.Field<string>("name") };
i got
Cannot implicitly convert type
'System.Data.EnumerableRowCollection<AnonymousType#1>'
to 'System.Data.EnumerableRowCollection<System.Data.DataRow>'
How to form the right query? My task is to replace the key with 1000 and leave the name as is.