jsmith
jsmith

Reputation: 7278

Tool for Querying data at Runtime with LINQ

The more and more I use the LINQ the more and more I really enjoy it, and it's syntax. I do a lot of data comparisons on a day to day basis. What I would really enjoy is a tool that allows me to load a DataSet, and then query that DataSet at runtime with LINQ queries. I primarily just want a tool, and to be able to load my DataSets dynamically.

Does something like this exist? I don't think LINQ was originally intended for this type of use, but I feel like it would be a powerful tool to have if it existed.

Upvotes: 0

Views: 208

Answers (4)

Jarrett Meyer
Jarrett Meyer

Reputation: 19573

You can use LINQ with the specification/filter pattern to create dynamically generated queries. There's a LINQ-to-SQL and LINQ-to-NHibernate implementation on Github.

Upvotes: 0

TheNextman
TheNextman

Reputation: 12566

You should check out LinqPad http://www.linqpad.net/

Upvotes: 3

mqp
mqp

Reputation: 71945

Sure, the tool is called DataTable.AsEnumerable().

Upvotes: 1

Jon Skeet
Jon Skeet

Reputation: 1500695

It's not entirely clear what you mean to be honest... but LINQPad allows you to load data and then query it.

Strongly-typed datasets are already easy to query with LINQ; weakly typed ones are a bit more of a pain, but LINQ to DataSet makes it easier than it would be otherwise.

Upvotes: 5

Related Questions