public virtual int Update(Type type, ICollection items) { ErrorIfClosed(); if (items.Count == 0) { return(0); } int result = 0; try { InternalOpen(); SqlTable table = TableFor(type); if (autocommit) { BeginInternal(); } result = table.Update(this, items); if (autocommit) { CommitInternal(); } } catch (Exception) { if (autocommit) { RollbackInternal(); } throw; } finally { InternalClose(); } return(result); }