Beispiel #1
0
        public void Create(string accountId, string buddyId)
        {
            if (Version > 0)
            {
                throw new InvalidOperationException($"Buddy with Id {accountId} already exists");
            }

            var e = new BuddyCreated(accountId, buddyId);

            Publish(e);
        }
Beispiel #2
0
 private void When(BuddyCreated e)
 {
     Id        = e.Id;
     _genreIds = new List <string>();
     _tasks    = new List <Task>();
 }