It depends on your definitions of "nothing fancy" and "simple", but BLToolkit does a pretty decent job of abstracting away boilerplate ADO.NET code that you don't really want to write manually. For instance,
public abstract class PersonAccessor : DataAccessor<Person>
{
[SqlQuery("SELECT * FROM Person WHERE PersonID = @id")]
public abstract Person GetPersonByID(int @id);
}
Person person = DataAccessor.CreateInstance<PersonAccessor>.
GetPersonByID(2);
will fetch a Person
object from the DB in just -- see that? -- 5-6 lines of code.
As for DataSet
s, here's how:
using (DbManager db = new DbManager())
{
DataSet ds = db
.SetCommand("SELECT * FROM Person")
.ExecuteDataSet();
Assert.AreNotEqual(0, ds.Tables[0].Rows.Count);
}
Adding parameters is as simple as calling a method on the DbManager
.
And you shouldn't be really afraid of ORMs.