In many cases when working with different types of data objects it's important to dispose of them to make sure that they don't leave a database connection open. However, table adapters don't seem vulnerable to this problem because they are built on the principle of disconnected data. I am under the impression that a table adapter will always close it's connection after the atomic Fill or Update method has completed, even in the presence of exceptions. Is this correct?
On the other hand, table adapters do implement IDisposable, so there must be some unmanaged resources to clean up at some point, right? Or is this just ceremony so that people can write:
using(var a = new MyTableTableAdapter())
{
a.Fill(ds.MyTable);
}
and not have to think about this topic?