/Sikiro.Dapper.Extension

This is an lambda extension of dapper, Chain style makes developers more elegant and intuitive.

Primary LanguageC#MIT LicenseMIT

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.

Nuget

Package NuGet
Sikiro.Dapper.Extension Sikiro.Dapper.Extension
Sikiro.Dapper.Extension.MsSql Sikiro.Dapper.Extension.MsSql
Sikiro.Dapper.Extension.MySql Sikiro.Dapper.Extension.MySql
Sikiro.Dapper.Extension.PostgreSql Sikiro.Dapper.Extension.PostgreSql

Install

MsSql

PM> Install-Package Sikiro.Dapper.Extension.MsSql

MySql

PM> Install-Package Sikiro.Dapper.Extension.MySql

PostgreSql

PM> Install-Package Sikiro.Dapper.Extension.PostgreSql

Document

https://github.com/SkyChenSky/Sikiro.Dapper.Extension/wiki

Features

1.Base On Dapper

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 IDbConnectionInterface, and retains and opens the original Execute, Query, etc

2.Simple And Intuitive Chain

Query

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);

Command

con.CommandSet<SysUser>().Where(a => a.Email == "287245177@qq.com").Update(a => new SysUser { Email = "123456789@qq.com" });

3.Support Async

ToListAsync
GetAsync
InsertAsync
DeleteAsync
UpdateSelectAsync
UpdateAsync

4.Faithful To Native Attribute

[Table("SYS_USER")]
[Key]
[Required]
[StringLength(32)]
[Display(Name = "主键")]
[Column("SYS_USERID")]
[DatabaseGenerated]

Build Entity Tool

AutoBuildEntity

img

Contribution

Welcome to submit Pull Request code changes. If you have any questions, you can submit them to issue for discussion.

License

MIT