public void SubmitRegistration (AnnualRegistration registration, User user) { registration.User = user; // get current term registration.RegistrationTerm = session.Query<RegistrationTerm>() .Single(t => t.Current); foreach (var skater in registration.Skaters) { var sessions = skater.Sessions; skater.Sessions = new List<SkatingSession>(); skater.Registration = registration; foreach (var skatingSession in sessions) { skater.Sessions.Add (session.Get<SkatingSession>(skatingSession.ID)); } } session.Save(registration); foreach (var skater in registration.Skaters) { session.Save (skater); } GenerateInvoice(registration); }
public ActionResult Create() { var user = new YaleFigureSkatingClub.Entities.User(); return View (user); }