/// <summary> /// Handler for the UpdateEventWinsRemainingCommand /// </summary> /// <param name="command">The UpdateEventWinsRemaingCommand</param> public void HandleCommand(UpdateEventWinsRemainingCommand command) { if (command != null) { ticketClaimRepository.UpdateRemainingWinnersForEvent(command.Eventid, command.WinsRemaining); } }
/// <summary> /// updates the number of remaining winners for an event. /// </summary> /// <param name="numberOfWinners">the number of individuals remaining that can win tickets.</param> /// <param name="eventId">the id of the event we are updating the winners for</param> public void UpdateEventWinRemainingCount(int eventId, int numberOfWinners) { UpdateEventWinsRemainingCommand updateWinner = new UpdateEventWinsRemainingCommand(eventId, numberOfWinners); commandBus.Execute(updateWinner); }