mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-22 10:42:52 +08:00
Update readme.md
This commit is contained in:
parent
d85c946e25
commit
16561cbc94
12
readme.md
12
readme.md
@ -111,11 +111,11 @@ var t5 = fsql.Select<Song>()
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
using (var uow = fsql.CreateUnitOfWork()) {
|
using (var uow = fsql.CreateUnitOfWork()) {
|
||||||
var songRepository = uow.GetRepository<Song, int>();
|
var repo1 = uow.GetRepository<Song, int>();
|
||||||
var tagRepository = uow.GetRepository<Tag, int>();
|
var repo2 = uow.GetRepository<Tag, int>();
|
||||||
|
|
||||||
await songRepository.InsertAsync(new Song());
|
await repo1.InsertAsync(new Song());
|
||||||
await tagRepository.InsertAsync(new Tag());
|
await repo2.InsertAsync(new Tag());
|
||||||
uow.Commit();
|
uow.Commit();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -168,9 +168,9 @@ public void ConfigureServices(IServiceCollection services) {
|
|||||||
|
|
||||||
Temporary disable:
|
Temporary disable:
|
||||||
```csharp
|
```csharp
|
||||||
var songRepository = fsql.GetRepository<Song, int>();
|
var repoq = fsql.GetRepository<Song, int>();
|
||||||
|
|
||||||
using (songRepository.DataFilter.Disable("Tenant")) {
|
using (repo1.DataFilter.Disable("Tenant")) {
|
||||||
//Tenant Invalid
|
//Tenant Invalid
|
||||||
}
|
}
|
||||||
//Tenant restore
|
//Tenant restore
|
||||||
|
Loading…
x
Reference in New Issue
Block a user