Skip to content

Instantly share code, notes, and snippets.

Avatar

Piotr Kula ppumkin

View GitHub Profile
View ConfigureProductAccessInformation.cs
//In the configurator thing I can keep on using DI.. Here I do basic caching and im my other implementation I decide
// whether to go to the repository or not (if in dictionary)
public class ConfigureProductAccessInformation
{
//a cache of settings here
public Dictionary<string, ProductAccessInformation> SiteSettings { get; set; }
private readonly IControlPanelRepository controlPanelRepository;
@ppumkin
ppumkin / Startup.cs
Last active Dec 19, 2018
ASPNET Core Razor to HTML String with Linux backed Docker
View Startup.cs
services.AddScoped<IViewRender, ViewRender>();
View dotnercore-startup-error.cs
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.UseSetting("detailedErrors", "true")
.CaptureStartupErrors(true)
.Build();