Skip to content

Instantly share code, notes, and snippets.

View b9chris's full-sized avatar
💭
Lucene.Net is good

b9chris

💭
Lucene.Net is good
View GitHub Profile
@b9chris
b9chris / BaseController.cs
Last active August 20, 2019 16:10
Asp.Net MVC BaseController that fixes a number of problems with the default MVC implementation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Web;
using System.Web.Mvc;
@b9chris
b9chris / TablePerConcreteEFB9.cs
Last active May 19, 2017 20:23
Entity Framework - Class-based Table-per-Concrete-Class (TPC) attributes and extender
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using System.Data.Entity.ModelConfiguration.Configuration;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Brass9.Collections.HasProp;
@b9chris
b9chris / NN.cs
Created May 27, 2015 20:36
Null Property Coalescence for C# 5 and Below
using System;
using System.Collections.Generic;
using System.Linq;
namespace Brass9
{
/// <summary>
/// Shorthand class for coping with common null situations
/// </summary>
public class NN
@b9chris
b9chris / ExpandedDbMigration
Last active February 24, 2017 23:21
Expanded Db Migrations
using System;
using System.Collections.Generic;
using System.Linq;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.IO;
using System.Text.RegularExpressions;
namespace Brass9.Data.Entity.Migrations