I'm using Data context in my ASP.NET web application.
ComponentDBDataClassesDataContext db = new ComponentDBDataClassesDataContext();
int ifUserExists = (from result in db.Customers where (userName == result.UserName) && (password == result.Password) select result.UserName).Count();
Should I close the data context every time i use it ? If so why should I close it ? If it should not be closed why ?
Can some one give me some elaborate and clear explanation?
Thank you in anticipation