分享自己写的基于Dapper的轻量级ORM框架~
1、说明 本项目是一个使用.NET Standard 2.0开发的,基于 Dapper 的轻量级 ORM 框架,包含基本的CRUD以及根据表达式进行一些操作的方法,目前只针对单表,不包含多表连接操作。 github: https://github.com/iamoldli/NetSql 2、使用方法 2.2、安装 Install-Package NetSql 2.2、创建实体 创建 Article 实体类,继承 EntityBase public class Article : EntityBase { [Column("Title")] public string Title1 { get; set; } public string Summary { get; set; } public string Body { get; set; } public Category Category { get; set; } public int ReadCount { get; set; } public bool IsDeleted { get; set; } public DateTime CreatedTime { get; set; } } public enum Category { Blog, Movie } EntityBase 是一个定义好的实体基类