From 264318c7a2047b5ee22b9ebd0cc83ecef58e7245 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Thu, 3 Nov 2022 12:15:59 -1000 Subject: [PATCH] Ra widget/anton (#27495) * Update WidgetController.cs * Null-forgiving operator not needed either * damnit widget Co-authored-by: Anton Curmanschii --- .../RoutingSample/Snippets/Controllers/WidgetController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aspnetcore/fundamentals/routing/samples/6.x/RoutingSample/Snippets/Controllers/WidgetController.cs b/aspnetcore/fundamentals/routing/samples/6.x/RoutingSample/Snippets/Controllers/WidgetController.cs index 29e70f8230..61ffd263c0 100644 --- a/aspnetcore/fundamentals/routing/samples/6.x/RoutingSample/Snippets/Controllers/WidgetController.cs +++ b/aspnetcore/fundamentals/routing/samples/6.x/RoutingSample/Snippets/Controllers/WidgetController.cs @@ -1,4 +1,4 @@ -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; namespace RoutingSample.Snippets.Controllers; @@ -35,9 +35,9 @@ public class WidgetController : ControllerBase { // var subscribePath = _linkGenerator.GetPathByAction( - "Subscribe", null!, new { id = 17 })!; + HttpContext, "Subscribe", null, new { id = 17 }); // - return Content(subscribePath); + return Content(subscribePath!); } }