protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
public static MyModel Create() { var model = new MyModel(); try { model.Database.ExecuteSqlCommand( "SET SESSION sql_mode = 'PAD_CHAR_TO_FULL_LENGTH';"); } catch { model.Dispose(); throw; } return(model); }
public void Dispose() { model.Dispose(); }
protected override void Dispose(bool disposing) { _mm.Dispose(); base.Dispose(disposing); }