예제 #1
0
파일: Repository.cs 프로젝트: nnhaigl/ico
        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;
            }
        }
예제 #2
0
파일: Repository.cs 프로젝트: nnhaigl/ico
 public Repository()
 {
     //dataContext = SingleDataContext.CurrentInstance();
     dataContext = new InvestmentDataContext();
     _disposed   = false;
 }
예제 #3
0
 public BaseService()
 {
     _dataContext = new InvestmentDataContext();
 }