Merge pull request #225 from dotnet/fixSnip

fix snip
pull/226/head
Rick Anderson 2023-10-12 16:52:56 -10:00 committed by GitHub
commit 66a114f446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -30,20 +30,15 @@ public class SmallCache : ICache
[Route("/cache")]
public class CustomServicesApiController : Controller
{
public ActionResult<object> GetOk(ICache cache)
{
return cache.Get("data-mvc");
}
[HttpGet("big")]
public ActionResult<object> GetBigCache([FromKeyedServices("big")] ICache cache)
{
return GetOk(cache);
return cache.Get("data-mvc");
}
[HttpGet("small")]
public ActionResult<object> GetSmallCache([FromKeyedServices("small")] ICache cache)
{
return GetOk(cache);
return cache.Get("data-mvc");
}
}