public EventManagementModel With(
     Guid?id = null,
     EventTitle eventTitle                       = null,
     EventDescription description                = null,
     EventLocation eventLocation                 = null,
     EventStartDate eventStartDate               = null,
     EventEndDate eventEndDate                   = null,
     RegistrationOpenDate registrationOpenDate   = null,
     RegistrationCloseDate registrationCloseDate = null
     ) => new EventManagementModel(
     id: id ?? Id,
     title: eventTitle ?? Title,
     description: description ?? Description,
     eventLocation: eventLocation ?? EventLocation,
     eventStartDate: eventStartDate ?? EventStartDate,
     eventEndDate: eventEndDate ?? EventEndDate,
     registrationOpenDate: registrationOpenDate ?? RegistrationOpenDate,
     registrationCloseDate: registrationCloseDate ?? RegistrationCloseDate
     );
 public EventManagementModel(
     Guid id,
     EventTitle title,
     EventDescription description,
     EventLocation eventLocation,
     EventStartDate eventStartDate,
     EventEndDate eventEndDate,
     RegistrationOpenDate registrationOpenDate,
     RegistrationCloseDate registrationCloseDate
     )
 {
     Id                    = id;
     Title                 = title;
     Description           = description;
     EventLocation         = eventLocation;
     EventStartDate        = eventStartDate;
     EventEndDate          = eventEndDate;
     RegistrationOpenDate  = registrationOpenDate;
     RegistrationCloseDate = registrationCloseDate;
 }
Ejemplo n.º 3
0
        public AddSportEventViewModel(
            SportEventService sportEventService,
            SportTypeService sportTypeService,
            UserService userService)
        {
            _sportEventService = sportEventService;
            _sportTypeService  = sportTypeService;
            _userService       = userService;

            SportTypeList = new ObservableCollection <SportType>();
            FillSportTypeList().GetAwaiter();

            EventStartDate = DateTime.Today;
            EventEndDate   = EventStartDate;
            EventStartTime = DateTime.Now;
            EventEndTime   = DateTime.Now;
            EventEndDate.AddHours(2);
            IsEventTypeSwitched     = true;
            ProposedSportSkillLevel = SportSkillLevelList.First();
        }