Browse Source
Merge pull request #11518 from git102347501/patch-4
Update Repositories.md
pull/11519/head
Berkan Sasmaz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
docs/zh-Hans/Repositories.md
|
|
|
@ -118,7 +118,8 @@ public class PersonRepository : EfCoreRepository<MyDbContext, Person, Guid>, IPe |
|
|
|
|
|
|
|
public async Task<Person> FindByNameAsync(string name) |
|
|
|
{ |
|
|
|
return await DbContext.Set<Person>() |
|
|
|
var dbContext = await GetDbContextAsync(); |
|
|
|
return await dbContext.Set<Person>() |
|
|
|
.Where(p => p.Name == name) |
|
|
|
.FirstOrDefaultAsync(); |
|
|
|
} |
|
|
|
|