Hello. I've done a site using ASP.NET MVC, NHibernate and MySQL. In my project, I have some repositories classes, each one with methods using codes like this:
using(ISession session = NHibernateHelper.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) {
session.Save(cidade);
transaction.Commit();
}
}
I come from Classic ASP, so I'm usure if the connection with MySQL is actually closed. In fact, I'm usure if there is a connection like there was on Classic ASP.
Should I do something to explicit close the connection/session or is it "autocloseable"?
There is a way to do if there are a lot of opened connection on my server?
Thank you very much.