public virtual void Update(T entity) { try { if (entity == null) { throw new ArgumentNullException("entity"); } if (Context == null || _isDisposed) { Context = new PlayGround_DbContext(); } SetEntryModified(entity); //Context.SaveChanges(); commented out call to SaveChanges as Context save changes will be called with Unit of work } catch (ValidationException dbEx) { throw new Exception(dbEx.Message, dbEx); } }
public EmployeeRepository(PlayGround_DbContext context) : base(context) { }
public GenericRepository(PlayGround_DbContext context) { _isDisposed = false; Context = context; }