diff --git a/docs/usage/use-built-in-abstract-repository.md b/docs/usage/use-built-in-abstract-repository.md index 3b74a492..30e8ab1e 100644 --- a/docs/usage/use-built-in-abstract-repository.md +++ b/docs/usage/use-built-in-abstract-repository.md @@ -138,7 +138,7 @@ public async Task GetByName(string name) { var spec = new HeroByNameSpec(name); - return await _heroRepository.GetBySpecAsync(spec); + return await _heroRepository.FirstOrDefaultAsync(spec); } ``` @@ -249,7 +249,7 @@ public class HeroService { var spec = new HeroByNameSpec(name); - return await _heroRepository.GetBySpecAsync(spec); + return await _heroRepository.FirstOrDefaultAsync(spec); } public async Task> GetHeroesFilteredByNameAndSuperPower(string name, string superPower)