In dotnet core 6 service (class library) I am accessing HttpContextAccessor.HttpContext.GetRouteData() but it says it does not contains definition for GetRouteData.
Any help on this.
Thanks.
In dotnet core 6 service (class library) I am accessing HttpContextAccessor.HttpContext.GetRouteData() but it says it does not contains definition for GetRouteData.
Any help on this.
Thanks.
GetRouteData() is an extension method in namespace Microsoft.AspNetCore.Routing.
You have to add using Microsoft.AspNetCore.Routing;