public async Task <ActionResult <Attendee> > PostAttendee(Domain.Attendee attendee) { _context.Attendees.Add(Attendee.FromDomain(attendee)); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAttendee", new { id = attendee.Id }, attendee)); }
public static Attendee FromDomain(Domain.Attendee domain) { return(new Attendee { FirstName = domain.FirstName, LastName = domain.LastName, EmailAddress = domain.EmailAddress, UserName = domain.UserName, }); }