Skip to content

Commit

Permalink
Patch 2 (#283)
Browse files Browse the repository at this point in the history
* Remove obsolete method

* Update use-built-in-abstract-repository.md
  • Loading branch information
davidhenley authored Sep 12, 2022
1 parent e244d50 commit 91d3644
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/usage/use-built-in-abstract-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public async Task<Hero> GetByName(string name)
{
var spec = new HeroByNameSpec(name);

return await _heroRepository.GetBySpecAsync(spec);
return await _heroRepository.FirstOrDefaultAsync(spec);
}
```

Expand Down Expand Up @@ -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<List<Hero>> GetHeroesFilteredByNameAndSuperPower(string name, string superPower)
Expand Down

0 comments on commit 91d3644

Please sign in to comment.