Ejemplo n.º 1
0
 public void Dispose()
 {
     if (_objectContextProvider.HasCurrent)
     {
         _objectContextProvider.Current.Dispose();
         _objectContextProvider.Clear();
     }
 }
Ejemplo n.º 2
0
 public IUnitOfWork BeginUnitOfWork()
 {
     ObjectContextProvider.Clear();
     return(Current = new UnitOfWork(ObjectContextProvider));
 }
 public IUnitOfWork BeginUnitOfWork()
 {
     ObjectContextProvider.Clear();
     HttpContext.Current.Items[HttpContextKey] = new UnitOfWork(ObjectContextProvider);
     return(Current);
 }