//
 // GET: /Speaker/Register
 public ActionResult Register()
 {
     var speaker = new Speaker();
     return View(speaker);
 }
Example #2
0
        public void Speaker_Must_Have_Atleast_One_Session()
        {
            var speaker = new Speaker();

            speaker.Sessions = new List<Session> {new Session {Topic = "Topic", StartTime = "1:00 PM"}};

            Assert.AreEqual(1, speaker.Sessions.Count);
        }
 public ActionResult Register(Speaker speaker)
 {
     try
     {
         _repository.InsertOrUpdate(speaker);
         _repository.Save();
         return RedirectToAction("Create", "Session", new {speakerId = speaker.Id});
     }
     catch
     {
         return View(speaker);
     }
 }