Convert Linq Result Set to DataTable

by mgordon 16. January 2008 13: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.

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.Net | Linq

Related posts

Comments are closed

Powered by BlogEngine.NET 1.1.0.7
Theme by Mads Kristensen

About the author

Name of author Mitch Gordon
Contractor specializing in .Net and other Microsoft technologies.

E-mail me Send mail

Recent posts

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009

Sign in