I am developing an MVC 5 Internet application. My controller has the following method:
protected override void Dispose(bool disposing)
{
if (disposing)
{
db.Dispose();
}
base.Dispose(disposing);
}
If I have a service class in this controller that uses the same object db, do I need a method Dispose()in this service class or Dispose()does the method in the controller take care of this?
Thanks in advance.
source
share