using DapperTest.Models; using System.Collections.Generic; using System.Web.Http; using Dapper; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Configuration; namespace DapperTest.Controllers { public class HomeControl…
来源:https://blog.csdn.net/Tomato2313/article/details/78880969 using DapperTest.Models; using System.Collections.Generic; using System.Web.Http; using Dapper; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Configuration…
Dapper 是一款非常不错的轻型 ORM 框架,使用起来非常方便,经常使用 EF 框架的人几乎感觉不到差别,下面是自己写的 Sqlite 通用帮助类: 数据连接类: public class SQLiteBaseRepository { public static string DbFile { get { return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "VideoInfo.db"); } } public st…