Exemplo n.º 1
0
 public EditEventDetails(GeneralEventInformation information, List <AppointmentDetails> upcomingAppointments, List <AppointmentFinderDetails> appointmentFinders, List <UserInformation> participants)
 {
     Information              = information;
     UpcomingAppointments     = upcomingAppointments;
     ActualAppointmentFinders = appointmentFinders;
     Participants             = participants;
 }
        public async Task <IActionResult> CreateEvent(GeneralEventInformation generalEventInformation)
        {
            IDatabaseContext context = _getDatabaseContext();
            var newEvent             = new Event
            {
                Title        = generalEventInformation.Title,
                Description  = generalEventInformation.Description,
                MeetingPlace = generalEventInformation.MeetingPlace,
                IsPrivate    = generalEventInformation.IsPrivate,
                ReminderTimeWindowInHours = generalEventInformation.ReminderTimeWindowInHours,
                SummaryTimeWindowInHours  = generalEventInformation.SummaryTimeWindowInHours,
                OrganizerId = HttpContext.GetUserId()
            };


            context.Events.Add(newEvent);

            await context.SaveChangesAsync();

            _auditLogger.LogInformation("{0}(): Created event {1} ({2})", nameof(CreateEvent), newEvent.Id, newEvent.Title);

            return(Ok(newEvent.Id));
        }
Exemplo n.º 3
0
 public EditEventDetails(GeneralEventInformation information, List <AppointmentDetails> upcomingAppointments, List <EventParticipantInformation> participants)
 {
     Information          = information;
     UpcomingAppointments = upcomingAppointments;
     Participants         = participants;
 }