Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to create a datatable from the LINQ?
Message
 
 
À
16/08/2013 20:35:00
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01580581
Message ID:
01580725
Vues:
30
>>I am going to try now this solution http://archive.msdn.microsoft.com/LinqEntityDataReader by MS employee David Browne.
>
>Why do you flit from one thing you can't understand to another, to another..... Just loop through the Linq collection and build a datatable. No problem at all...

I wanted to try this idea, but I don't know how to access the fields in the anonymous type.

In other words, can you show me what can I do here?
 foreach (var row in resultingQuery)
I can not convert row into DataRow, therefore I don't see a way to access each individual column of that resulting query. David's class solves this problem, but if I can create a simpler code, I'd love to.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform