Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to create a datatable from the LINQ?
Message
 
 
À
15/08/2013 19:17:08
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:
01580586
Vues:
36
>CopyToDataTable needs an IEnumberable of DataRows. We've discussed this before. See message #1573336. The code I gave you there is basically a simpler and less tested version of what was in the blog post.

I am going to implement it as shown here then

http://msdn.microsoft.com/en-us/library/bb669096.aspx

I copied the code into my project, but now I am getting a warning

Warning 1 Type library exporter warning processing Warning: Type library exporter encountered a generic type. Generic classes may not be exposed to COM.

Googling on this error suggests this workaround:

Make sure you have the ComVisible(false) attribute at the assembly
level (for example in AssemblyInfo.cs), and then explcitly mark the
types you want to export to COM with ComVisible(true).

I think I may need to consult with other developers in our company.
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