From 91d3644659110680c759ed6cd1c9c2eecdb5c197 Mon Sep 17 00:00:00 2001 From: David Henley Date: Mon, 12 Sep 2022 16:12:51 -0500 Subject: [PATCH] Patch 2 (#283) * Remove obsolete method * Update use-built-in-abstract-repository.md --- docs/usage/use-built-in-abstract-repository.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)