public SpeakerProfile(CreateSpeakerProfileInput input, User user) { Maintainer = user; Name = input.Name; Email = input.Email; Twitter = input.Twitter; PhoneNumber = input.PhoneNumber; Bio = input.Bio; ImageUrl = input.ImageUrl; HomePageUrl = input.HomePageUrl; }
public ActionResult ProcessCreation(CreateSpeakerProfileInput input, User user) { if (ModelState.IsValid) { using (var db = new DataContext(user)) { db.SpeakerProfiles.Add(new SpeakerProfile(input, user)); db.SaveChanges(); } return(RedirectToAction("Index", "Home", new { area = "Organizer" })); } return(View()); }