Ejemplo n.º 1
0
        public bool AddNomination(Dog dog, AdvertisedEvent advertisedEvent)
        {
            if (!isValidDistanceForTrack())
            {
                return false;
            }

            var raceEvent = GetExistingRaceEvent(advertisedEvent) ??
                            new RaceEvent(this, identityGenerator.NewId(), advertisedEvent);

            nominations.Add(new Nomination(this, identityGenerator.NewId(), dog, raceEvent));
            return true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// This will retrieve an existing race event with the same Advertised Event and share an aggregate root.        
 /// </summary>
 /// <param name="advertisedEvent"></param>
 /// <returns>The race event if it exists, otherwise null</returns>
 public RaceEvent GetExistingRaceEvent(AdvertisedEvent advertisedEvent)
 {
     throw new NotImplementedException();
 }