Skip to content

Instantly share code, notes, and snippets.

@warappa
warappa / AppDbContext.cs
Last active June 17, 2019 15:32
Using global value converters with Entity Framework Core 2.2.5. Based on Andrew Lock's StronglyTypedIdValueConverterSelector https://andrewlock.net/strongly-typed-ids-in-ef-core-using-strongly-typed-entity-ids-to-avoid-primitive-obsession-part-4/
using Microsoft.EntityFrameworkCore;
namespace GlobalValueConverterSample
{
public class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options)
: base(options)
{
public class GetEventStoreSubscriptionDispatcher
{
private const string EventClrTypeHeader = "EventClrTypeName";
private readonly IBus bus;
private readonly IEventStoreConnection eventStoreConnection;
private readonly MongoDatabase mongoDatabase;
private static readonly JsonSerializerSettings SerializerSettings;
static GetEventStoreSubscriptionDispatcher()
{
@OdeToCode
OdeToCode / gist:5024867
Last active December 14, 2015 03:59
AngularJS Snippet
<div ng-app="videoApp" ng-controller="VideoController">
<table>
<thead>
<th>Title</th>
<th>Length</th>
<th></th>
</thead>
<tbody>
<tr data-id="{{video.Id}}" ng-repeat="video in videos">