Skip to content

Instantly share code, notes, and snippets.

View markrivo's full-sized avatar
🇵🇭
Focusing

Marvelous Markus markrivo

🇵🇭
Focusing
  • Mandaluyong, Philippines
View GitHub Profile
@Lobstrosity
Lobstrosity / 1.Widget.cs
Created August 9, 2011 00:13
Mapping Parent-Child Relationships with Dapper
public class Widget
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
public class EventDistributor
{
private readonly Dictionary<Type, List<WeakReference>> _events;
private static readonly Object Padlock = new Object();
public Distributor()
{
_events = new Dictionary<Type, List<WeakReference>>();
}
@davidfowl
davidfowl / Global.asax.cs
Last active December 4, 2025 20:12
ASP.NET MVC and ServiceCollection sample
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Microsoft.Extensions.DependencyInjection;
using WebApplication16;
using WebApplication16.Controllers;