public async Task <Event> CreateEvent(Event newEvent) { await _context.AddAsync(newEvent); await _context.SaveChangesAsync(); return(newEvent); }
public async Task <Day> CreateDayAsync(Day newDay) { await _context.AddAsync(newDay); await _context.SaveChangesAsync(); return(newDay); }
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); }