Update README.md

This commit is contained in:
sunkaixuan 2017-05-27 02:09:05 +08:00 committed by GitHub
parent 9ba621286b
commit 46c9bf8ba3

View File

@ -269,19 +269,20 @@ var t10 = db.Updateable<Student>()
.Where(it => it.Id == 11).ExecuteCommand(); .Where(it => it.Id == 11).ExecuteCommand();
``` ```
## 4. Mapping ## 5. Table structure is different from entity
##### Priority level AS>Add>Attribute ##### Priority level
### 4.1 Add AS>Add>Attribute
### 5.1 Add
```c ```c
db.MappingTables.Add() db.MappingTables.Add()
db.MappingColumns.Add() db.MappingColumns.Add()
db.IgnoreColumns.Add() db.IgnoreColumns.Add()
``` ```
### 4.2 AS ### 5.2 AS
```c ```c
db.Queryable<T>().As("tableName").ToList(); db.Queryable<T>().As("tableName").ToList();
``` ```
### 4.3 Attribute ### 5.3 Attribute
```c ```c
[SugarColumn(IsIgnore=true)] [SugarColumn(IsIgnore=true)]
public int TestId { get; set; } public int TestId { get; set; }