title: Using a Singleton pattern to Linq to Sql Data Context
body: <p>I have some confusion in Linq to SQL.I am searching for an actual reason why Data context class gives follwing Exception some times .</p>
  
  <p>"There is already an open data reader associated with this command which must be closed first</p>
  
  <p>Specially in multitasking environment.Most people are saying that the reason is ,Data Context is not thread Safe.All are suggesting to use DataContex as one per unit of work.</p>
  
  <p>Please refer following  thread for best answer </p>
  
  <p><a href="https://stackoverflow.com/questions/4918625/linq-to-sql-datacontext-across-multiple-threads">Linq-to-SQL Data Context across multiple threads</a></p>
  
  <p>But in my case,i am using another class call "A" which is implemented in Singleton pattern.Purpose of this class is ,provide Data context object in singleton manner.I am maintaining instance of this class "A" as global instance in derived class and calling to Datacontex by using particular instance.</p>
  
  <p><strong>My question is,</strong></p>
  
  <p>Will my method call cause uncontrolled memory growth ? based on my understanding,singleton maintaining one instance as static object .If my assumption is wrong ,please give me good explanation.</p>
  
  <p><strong>Note:</strong></p>
  
  <p>Any way my method call also throws same exception.So i am sure same problem is happen in this scenario also.</p>