private static string GetConnectionString(Type type) { //Can't switch on type, and missing patterns from C# 7 =( if (type == typeof(C3MSEntities)) { return(DbContextHelpers.FormatC3msEfConnectionString(DbContextHelpers.GetC3msConnectionString())); } if (type == typeof(SslamEntities)) { return(DbContextHelpers.FormatSslamEfConnectionString(DbContextHelpers.GetC3msConnectionString())); } return(null); }