public static DynamicEntityContext New(string nameOrConnectionString) { Check.NotEmpty(nameOrConnectionString, "nameOrConnectionString"); var connection = DbHelpers.GetDbConnection(nameOrConnectionString); DbCompiledModel model = GetCompiledModel(connection); return(new DynamicEntityContext(nameOrConnectionString, model)); }