good work! but find a problem.

Dec 7, 2011 at 2:50 AM

good work!

but when i use it in my mvc project and i use autofac as my Ioc,

some times i get the problem in :

protected virtual void Dispose(bool disposing)
        {
            if (!this._disposed)
            {
                if (disposing)
                {
                        _context.Dispose();
                        _context = null;
                    _repositories.Clear();
                }
            }
            this._disposed = true;
        }

and when dispose, _context  is null ,so get the error.

then i change it to this:

protected virtual void Dispose(bool disposing)
        {
            if (!this._disposed)
            {
                if (disposing)
                {
                    if (_context != null)
                    {
                        _context.Dispose();
                        _context = null;
                    }

                    _repositories.Clear();
                }
            }
            this._disposed = true;
        }

it's OK!

Coordinator
Dec 7, 2011 at 5:01 PM

Obviously:) As I mentioned in description of version - it wasn't test in real-time:) Thx indeed for tip;) I'm changing this...