PPPDDDChap23.EventSourcing.Application.Infrastructure.PayAsYouGoAccountRepository.GetExpectedVersion C# (CSharp) Method

GetExpectedVersion() private method

private GetExpectedVersion ( int expectedVersion ) : int?
expectedVersion int
return int?
        private int? GetExpectedVersion(int expectedVersion)
        {
            if (expectedVersion == 0)
            {
                // first time the aggregate is stored there is no expected version
                return null;
            }
            else 
            {
                return expectedVersion;
            }
        }