Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Linq Blues
Message
From
14/01/2015 07:59:56
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01613589
Message ID:
01613592
Views:
50
Instead of .Where, try .First or .FirstOrDefault. You'll need to test for condition where no records are returned.

>Succeeded in getting this passed the editor. Note that customers is a DataTable.
>
>  IEnumerable<DataRow[]> r1 = (IEnumerable<DataRow[]>) customers.AsEnumerable().Where(r => (r["ID"] == ID));
>
>
>now how do I get the first row cast as a DataRow?
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform