/// <summary> /// Saves changes in context (SaveChanges) and, if there is an open transaction, commits as well. /// </summary> /// <returns>True if there was any entity changed or false if there wasn't</returns> public bool Commit() { if (_context.SaveChanges() <= 0) { return(false); } _dbContextTransaction?.Commit(); return(true); }
public virtual int SaveChanges() { return(Context.SaveChanges()); }