Sikiro.Dapper.Extension - a simple lambda extension for dapper 中文
This is an extension based on dapper, supporting lambda expression, chain style allows developers to use more elegant and intuitive.
Package | NuGet |
---|---|
Sikiro.Dapper.Extension | |
Sikiro.Dapper.Extension.MsSql | |
Sikiro.Dapper.Extension.MySql | |
Sikiro.Dapper.Extension.PostgreSql |
PM> Install-Package Sikiro.Dapper.Extension.MsSql
PM> Install-Package Sikiro.Dapper.Extension.MySql
PM> Install-Package Sikiro.Dapper.Extension.PostgreSql
https://github.com/SkyChenSky/Sikiro.Dapper.Extension/wiki
Sikiro. Dapper. Extension is a dotNet Standard library hosted in nuget. It can be used in dotNet framework and dotNet Core platform.
The lambda expression encapsulation based on dapper is still an extension of IDbConnection
Interface, and retains and opens the original Execute
, Query
, etc
con.QuerySet<SysUser>().Where(a => a.Email == "287245177@qq.com")
.OrderBy(a => a.CreateDatetime)
.Select(a => new SysUser { Email = a.Email, CreateDatetime = a.CreateDatetime, SysUserid = a.SysUserid })
.PageList(1, 10);
con.CommandSet<SysUser>().Where(a => a.Email == "287245177@qq.com").Update(a => new SysUser { Email = "123456789@qq.com" });
ToListAsync
GetAsync
InsertAsync
DeleteAsync
UpdateSelectAsync
UpdateAsync
[Table("SYS_USER")]
[Key]
[Required]
[StringLength(32)]
[Display(Name = "主键")]
[Column("SYS_USERID")]
[DatabaseGenerated]
Welcome to submit Pull Request code changes. If you have any questions, you can submit them to issue for discussion.