资 源 简 介
A Simple .Net Database Library based on IQToolkit.
SimpleDatabase uses SimpleMapping, which extends BasicMapping of IQToolkit, and follows Convention over configuration concept. If your class name (entity name) and property/field name are matched with table name and column names, no mapping required. If they are not matched, you can use simple Attributes to make mapping.
Samples:
```
//entity samples
using (Db db = Northwind.GetDb())
{
//insert
using (DbTransactionInfo tr = db.BeginTransaction())
{
TestEntity te = new TestEntity();
te.LoginName = "Admin";
db.Insert(te);
tr.Commit();
}
//update
using (DbTransactionInfo tr = db.BeginTransaction())
{
var q = from e in db.Query()
where e.LoginName == "A