My Controllers inherit from a class that contains a field that implements IDisposable. So my first instinct was to write:

```
public abstract class EventRepositoryControllerBase : Controller
{
    protected EventRepository eventRepos { get; private set; }

    public EventRepositoryControllerBase(EventRepository eventRepos)
    {
        this.eventRepos = eventRepos;
    }

    public override void Dispose()
    {
        try
        {
            base.Dispose();
        }
        finally
        {
            eventRepos.Dispose();
        }
    }
}

```

but this won't compile because Controller does not mark the Dispose method as virtual/override. So now I think I'm stuck. Even if I mark my method as new, won't the framework hold references typed as Controller and as such my method will never be invoked? Suggestions on how to work around this?

**UPDATE**

So I looked at the MVC3 source and saw this:

```
 public void Dispose() {
        Dispose(true /* disposing */);
        GC.SuppressFinalize(this);
    }

    protected virtual void Dispose(bool disposing) {
    }

```

So I guess I'll just put my code in the 2nd method. Not sure that this behavior is contractually specified though.