MapDot
MapDot

Reputation: 315

Weakly typed LINQ to Relational Data

Strong typing is fine and dandy when you know what your schema is going to look like at compile time. But what if you're working on an application that lets the user define their own schema?

Is there a reliable relational LINQ provider out there that operates at the same level of abstraction as LINQ to XML?

Example:

var whoIsJohnGalt = db.Tables["Persons"]
    .Where( row => row["First Name"] == "John" && row["LastName"] == "Galt")
    .Select( row => row["Bio"] );

LINQ to DataSet doesn't count because it's not that much different from LINQ to Objects: it requires the dataset to be pre-filled.

Many PHP frameworks (e.g. Zend_Table, CakePHP's models) operate in this manner, so it's not entirely infeasible. But if no such tool exists, I'm probably better off with raw ADO.net than with strongly-typed code generation.

Upvotes: 1

Views: 400

Answers (1)

Jay
Jay

Reputation: 57959

How about Dynamic LINQ?

Upvotes: 1

Related Questions