Browse Source

Merge pull request #11518 from git102347501/patch-4

Update Repositories.md
pull/11519/head
Berkan Sasmaz 4 years ago
committed by GitHub
parent
commit
efebd7ed6c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      docs/zh-Hans/Repositories.md

3
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();
}

Loading…
Cancel
Save