Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to create a datatable from the LINQ?
Message
 
 
To
15/08/2013 19:17:08
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01580581
Message ID:
01580586
Views:
37
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform