MagicalConch
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
2 deletions
-
docs/zh-Hans/Repositories.md
|
|
|
@ -118,8 +118,8 @@ public class PersonRepository : EfCoreRepository<MyDbContext, Person, Guid>, IPe |
|
|
|
|
|
|
|
public async Task<Person> FindByNameAsync(string name) |
|
|
|
{ |
|
|
|
var dbcontext = await GetDbContextAsync(); |
|
|
|
return await dbcontext.Set<Person>() |
|
|
|
var dbContext = await GetDbContextAsync(); |
|
|
|
return await dbContext.Set<Person>() |
|
|
|
.Where(p => p.Name == name) |
|
|
|
.FirstOrDefaultAsync(); |
|
|
|
} |
|
|
|
|