Example #1
0
        public Task Verify <TEntity, TState>(TEntity entity) where TEntity : IEntity <TState> where TState : class, IState, new()
        {
            if (entity.Dirty)
            {
                throw new ArgumentException($"Cannot verify version for a dirty entity");
            }

            return(_eventstore.VerifyVersion <TEntity>(entity.Bucket, entity.Id, entity.Parents, entity.Version));
        }