"/> ">
var connStr = ConfigurationManager.ConnectionStrings["dbconnstr"].ConnectionString;
SQLContext db = new SQLContext(connStr);
//list查询
var list1 = db.GetList
var list2 = db.GetList
var list3 = db.Query
//多条件查询
var query = db.Query
query.Where(s => s.Name == "b");
query.Where(s => s.ID > 5);
var result = query.ToList();
//分页查询
var pageResult1 = db.GetPageResult
var pageResult2 = db.GetPageResult
var pageResult3 = db.Query
//插入
int row1 = db.Insert
int row2 = db.InsertBatch
new Config { Name = "b" },
new Config { Name = "c" }
});
//更新
int update1 = db.Update
int update2 = db.Query
//删除
int delete1 = db.Delete
int delete2 = db.Query
int delete3 = db.Delete
//如发现不支持上述语句,请下载最新版本
以上是szq.orm.sql详细使用实例代码的详细内容。更多信息请关注PHP中文网其他相关文章!