Why not just use the Entity or Linq-to-SQL framework
If you have a table named Foos yoiu, enter the code, for example:
using(var db = new MyEntityBase()){ var selectedFoo = from foo in db.Foos where foo.Bar > 4 select foo;
which in turn is converted to SQL as:
select * from Foos where Bar = 4
The above C # code is strongly typed, and the Entity structure will create all the necessary data classes for you.
Rune fs
source share