Ejemplo n.º 1
0
        protected virtual void Dispose(bool disposing)
        {
            // If you need thread safety, use a lock around these
            // operations, as well as in your methods that use the resource.
            if (!_disposed)
            {
                if (disposing)
                {
                    if (dataContext != null)
                    {
                        dataContext.Dispose();
                    }
                }

                // Indicate that the instance has been disposed.
                dataContext = null;
                _disposed   = true;
            }
        }
Ejemplo n.º 2
0
 public Repository()
 {
     //dataContext = SingleDataContext.CurrentInstance();
     dataContext = new InvestmentDataContext();
     _disposed   = false;
 }
Ejemplo n.º 3
0
 public BaseService()
 {
     _dataContext = new InvestmentDataContext();
 }