/* * WARNING: This is the quick and easy way to make the controller * use a different Context - good enough for our purposes. * The "right" way is through Dependency Injection via the constructor (look this up if interested). */ // TODO: Add a "UseContext" method if you wish to change the "db" context for unit testing // See the lecture on testing protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }