9
Pobieranie bezwzględnych adresów URL przy użyciu ASP.NET Core
W MVC 5 miałem następujące metody rozszerzeń do generowania bezwzględnych adresów URL zamiast względnych: public static class UrlHelperExtensions { public static string AbsoluteAction( this UrlHelper url, string actionName, string controllerName, object routeValues = null) { string scheme = url.RequestContext.HttpContext.Request.Url.Scheme; return url.Action(actionName, controllerName, routeValues, scheme); } public static string AbsoluteContent( this …
82
c#
asp.net-core