Is anyone aware of a such a thing as a SQL writing library for .Net? I'm thinking it would be wrapper for generating queries in an object oriented style. Maybe something like the following:
class SelectQuery : BaseQuery
{
List<Column> SelectedColumns { get; set; }
Table MainTable { get; set; }
List<Join> Joins { get; set; }
List<Condition> Conditions { get; set; }
List<Column> Order { get; set; }
string Write() { }
}
Nevermind why I'm looking for something to do this. And, there's no specific problem which this would address for me, I'm just interested in seeing such a thing.
Please note, I am not looking for an O/RM, but a means of writing SQL, and representing queries with objects.