首先要安裝 Dapper.Contrib,直接從nuget安裝即可。
dapper官方文檔:http://dapper-tutorial.net/dapper
T Get<T>(id); IEnumerable<T> GetAll<T>(); int Insert<T>(T obj); int Insert<T>(Enumerable<T> list); bool Update<T>(T obj); bool Update<T>(Enumerable<T> list); bool Delete<T>(T obj); bool Delete<T>(Enumerable<T> list); bool DeleteAll<T>();
支持插入、更新實體,批量插入、批量更新實體。