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

Add() public method

public Add ( PayAsYouGoAccount payAsYouGoAccount ) : void
payAsYouGoAccount PPPDDDChap23.EventSourcing.Application.Model.PayAsYouGo.PayAsYouGoAccount
return void
        public void Add(PayAsYouGoAccount payAsYouGoAccount)
        {
            var streamName = string.Format("{0}-{1}", typeof(PayAsYouGoAccount).Name, payAsYouGoAccount.Id.ToString());

            _eventStore.CreateNewStream(streamName, payAsYouGoAccount.Changes);
        }