public HomeController(MyDbContext someDb = null) { //If we were given a null context, just use the default context if (someDb == null) { Db = new MyDbContext("MyDbContext"); } else { //otherwise, use the supplied context Db = someDb; } }