Beispiel #1
0
        public async Task <Event> CreateEvent(Event newEvent)
        {
            await _context.AddAsync(newEvent);

            await _context.SaveChangesAsync();

            return(newEvent);
        }
Beispiel #2
0
        public async Task <Day> CreateDayAsync(Day newDay)
        {
            await _context.AddAsync(newDay);

            await _context.SaveChangesAsync();

            return(newDay);
        }
Beispiel #3
0
        public async Task <Speaker> CreateSpeakerAsync(Speaker newSpeaker)
        {
            await _context.AddAsync(newSpeaker);

            await _context.SaveChangesAsync();

            return(newSpeaker);
        }
        public async Task <EventRegistrationAudit> CreateEventRegistrationAudit(Registration newEventRegistration)
        {
            var newRegistrationAudit = new EventRegistrationAudit
            {
                EventId            = newEventRegistration.EventId.ToString(),
                RegistrationTypeId = newEventRegistration.RegistrationTypeId.ToString(),
                FirstName          = newEventRegistration.FirstName,
                LastName           = newEventRegistration.LastName,
                Email    = newEventRegistration.Email,
                Modified = DateTime.Now,
                Status   = "Starting"
            };

            await _context.AddAsync(newRegistrationAudit);

            await _context.SaveChangesAsync();

            return(newRegistrationAudit);
        }