views:

121

answers:

2

We're building a simple ADO.Net infrastructure, and looking for the best practice for creating one or more objects/methods to handle queries to SQL Server.

Such a method could for example, take a connection string and a query (or stored proc), and return a datatable, dataset, etc., with the query results.

How has this worked best for you in the past? If you could mention what your method signature(s) looked like or include some code, that would be helpful.

A: 

Look at my post here, simple enough? :)

arbiter
+1  A: 

You might want to look at NHibernate, LINQ to SQL, ADO.NET Entity Framework or another ORM. They are mostly mature technologies to interact with ADO. Happy coding

Kane
I believe LINQ to SQL works only with SQL Server.
John Saunders
Yes @John is correct. LINQ to SQL only works with SQL Server (2000, 2005 or 2008).
Kane
We hand-coded it for now, but I guess the world is pretty much going to ORMS...will try out some of these when we get a chance.
alchemical