mirror of https://github.com/abpframework/abp.git
8 changed files with 20 additions and 27 deletions
@ -0,0 +1,15 @@ |
|||
using Microsoft.AspNetCore.Mvc.Rendering; |
|||
using Microsoft.AspNetCore.Mvc.Routing; |
|||
using Microsoft.Extensions.DependencyInjection; |
|||
|
|||
namespace Microsoft.AspNetCore.Mvc.ViewFeatures |
|||
{ |
|||
public static class ViewContextExtensions |
|||
{ |
|||
public static IUrlHelper GetUrlHelper(this ViewContext viewContext) |
|||
{ |
|||
var urlHelperFactory = viewContext.HttpContext.RequestServices.GetRequiredService<IUrlHelperFactory>(); |
|||
return urlHelperFactory.GetUrlHelper(viewContext); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue