Convert Linq Result Set to DataTable

by mgordon 16. January 2008 07:43

I'm in the process of evaluating Linq by converting an existing data layer from using Subsonic to to using Linq queries.  One challenge with this, of course, is trying not to change method signatures in the process.  I have some methods that return DataSets and was stressing over having to modify all the logic that called the methods to consume a return type of var, or a collection of entity classes instead.  Thankfully, while looking for possible solutions to the problem, I stumbled over this article from CoDe Magazine that contains code for an extension method that converts a Linq result into a DataTable.

Tags: ,

.Net | Linq

Comments

8/25/2009 8:06:14 AM #

Please, can you PM me and tell me few more thinks about this, I am really fan of your blog...

bad credit loans United States

9/15/2009 4:22:32 PM #

Hello. Great job. I did not expect this on a Wednesday. This is a great story. Thanks!

payday loan United States

Comments are closed

Powered by BlogEngine.NET 1.5.0.7
Theme by Extensive SEO