Update readme.md

This commit is contained in:
2881099 2019-04-27 05:44:11 +08:00 committed by GitHub
parent d85c946e25
commit 16561cbc94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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