コード例 #1
0
        private void SaveEvent()
        {
            var newEvent = new EventDto
                {
                    EventTypeId = SelectedEventType.Id,
                    SportTypeId = SelectedTeam.Dto.SportTypeId,
                    Team = SelectedTeam.Dto,
                    Opponent = SelectedOpponent != null ? SelectedOpponent.Dto : null,
                    Location = SelectedField.Dto,
                    Date = new DateTime(EventDate.Year, EventDate.Month, EventDate.Day, EventTime.Hour, EventTime.Minute, 0),
                    Notes = this.Notes,
                };

            _eventRepository.Save(newEvent);
        }
コード例 #2
0
        public void Save(EventDto eventDto )
        {
            try
            {
                DB.Database.Save<EventDto>(eventDto);

                DB.Database.Flush();
            }
            catch (Exception e)
            {
                var x = e;
            }
        }
コード例 #3
0
 public GameEvent(EventDto dto)
     : base(dto)
 {
 }
コード例 #4
0
 public Event(EventDto dto)
 {
     Dto = dto;
 }
コード例 #5
0
 public PracticeEvent(EventDto dto)
     : base(dto)
 {
     if (dto.PracticeDrills != null)
     {
         PracticeDrills = dto.PracticeDrills.Select(x => new PracticeDrill(x)).ToList();
     }
 }