Fix BaseEntity.SaveOrUpdate to use transaction and fix AddUser to use it.