コード例 #1
0
        private void AddEventSlot(int eventTypeId, DateTime eventDate, Event eventPage)
        {
            var eventSlot = new EventSlot()
            {
                EventTypeId                 = eventTypeId,
                EventPageId                 = eventPage.Id,
                Date                        = eventDate,
                Cost                        = eventPage.Cost,
                MaxParticipants             = eventPage.MaximumParticipants,
                RequiresBTFLicense          = eventPage.RequiresBtflicense,
                IndemnityWaiverDocumentLink = eventPage.IndemnityWaiver?.Url,
                CovidDocumentLink           = eventPage.CovidHealthDeclaration?.Url,
                IsGuestEvent                = eventPage.IsGuestEvent
            };

            eventSlot.SetDisances(eventPage.RaceDistances);
            _eventSlotRepository.Create(eventSlot);
        }