Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
SkyChenSky authored Mar 25, 2019
1 parent e73838b commit 2c32979
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Sikiro.Dapper.Extension - 基于dapper简单易用的lambda扩展 [中文](https://github.com/SkyChenSky/Sikiro.DapperLambdaExtension.MsSql/blob/master/README.md)
Sikiro.Dapper.Extension - a simple lambda extension for dapper [中文](https://github.com/SkyChenSky/Sikiro.DapperLambdaExtension.MsSql/blob/master/README.md)
========================================


这是基于dapper的一个扩展,支持lambda表达式的写法,链式风格让开发者使用起来更加优雅、直观。
This is an extension based on dapper, supporting lambda expression, chain style allows developers to use more elegant and intuitive.


Nuget
Expand All @@ -14,7 +13,7 @@ Nuget
| Sikiro.Dapper.Extension.MySql | [![Sikiro.Dapper.Extension.MySql](https://img.shields.io/badge/nuget-v2.0.0.0-blue.svg)](https://www.nuget.org/packages/Sikiro.Dapper.Extension.MySql/)|
| Sikiro.Dapper.Extension.PostgreSql |[![Sikiro.Dapper.Extension.PostgreSql](https://img.shields.io/badge/nuget-v2.0.0.0-blue.svg)](https://www.nuget.org/packages/Sikiro.Dapper.Extension.PostgreSql/)|

安装
Install
------------
#### MsSql
```
Expand All @@ -28,38 +27,40 @@ PM> Install-Package Sikiro.Dapper.Extension.MySql
```
PM> Install-Package Sikiro.Dapper.Extension.PostgreSql
```
文档
Document
---------
https://github.com/SkyChenSky/Sikiro.Dapper.Extension/wiki

特性
Features
---------
### 1.基于dapper的扩展
Sikiro.Dapper.Extension是托管于nuget的一个dotNet Standard库。可使用于dotNet framework与dotNet Core平台。
### 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 `IDbConnection'Interface, and retains and opens the original `Execute', `Query', etc

基于dapper基础上做了lambda表达式封装,仍然是`IDbConnection` Interface的扩展,并保留与开放原生的`Execute``Query`等方法。
### 2.简单直观的链式写法
#### 查询
### 2.Simple and intuitive chain
#### Query
```c#
con.QuerySet<SysUser>().Where(a => a.Email == "[email protected]")
.OrderBy(a => a.CreateDatetime)
.Select(a => new SysUser { Email = a.Email, CreateDatetime = a.CreateDatetime, SysUserid = a.SysUserid })
.PageList(1, 10);
```

#### 指令
#### Command
```c#
con.CommandSet<SysUser>().Where(a => a.Email == "[email protected]").Update(a => new SysUser { Email = "[email protected]" });
```
### 3.支持异步
### 3.Support Async
```c#
ToListAsync
GetAsync
InsertAsync
DeleteAsync
UpdateAsync
```
### 4.忠于原生的特性标签
### 4.Faithful to Native Attribute
```c#
[Table("SYS_USER")]
[Key]
Expand All @@ -69,15 +70,17 @@ UpdateAsync
[Column("SYS_USERID")]
```

实体生成工具
Build Entity Tool
-------
[AutoBuildEntity](https://github.com/SkyChenSky/AutoBuildEntity)

![img](https://github.com/SkyChenSky/AutoBuildEntity/blob/master/AutoBuildEntity/Resources/entity.gif "效果图")

贡献

Contribution

-------
欢迎各位提交Pull Request代码变更,如果有问题可提交issue进行讨论。
Welcome to submit Pull Request code changes. If you have any questions, you can submit them to issue for discussion.

License
-------
Expand Down

0 comments on commit 2c32979

Please sign in to comment.