An alternative to Server.MapPath in .NET Core

Hello,I missed the Server.MapPath in .NET core. It is useful to get the physical path from a virtual directory in IIS.When using blazor locally I also prefer to use the local IIS.Fortunately this package exists, : install-package Microsoft.Web.AdministrationCombined with System.Runtime.Caching, ...

Read more

  • Raphaël Desalbres
  •  C-Sharp

Cache Helper

Hi, Here's a MVC C# cache helper I found here https://stackoverflow.com/questions/343899/how-to-cache-data-in-a-mvc-application, but I've modified it to take in account all data types and not only classes... public static class InMemoryCache     {         public static T GetOrSet<T>(string cacheKey, Func<T> getItemCallback)         {             if (HttpContext.Current == null || HttpContext.Current.Cache == null)                 return getItemCallback(); ...

Read more