一个简单的 microORM,它将查询的结果映射到 POCO 对象中。该项目基于 Schotime 的 PetaPoco 分支。
Welcome to the NPoco! NPoco is a fork of PetaPoco based on Schotime's branch with a handful of extra features.
public class User
{
public int UserId { get;set; }
public string Email { get;set; }
}
IDatabase db = new Database("connStringName");
List users = db.Fetch("select userId, email from users");This works by mapping the column names to the property names on the User object. This is a case-insensitive match.
There is no mapping setup needed for this (query only) scenario.
Checkout the Wiki for more documentation.
暂无开放 Issues,或尚未同步最近议题。