I'm creating an EntityFramework object in the default constructor of my Controller.
To free the memory after calling action method inside any controller, I want to make the controller disposable. Is this a good idea?
public somethingController : Controller , IDisposable
{
// implement the dispose method here
public void Dispose ()
{
EntityFrameWorkObject.Dispose();
}
}
what do you think?