Exemplo n.º 1
0
        public bool CreateSpeaker(CreateSpeakerModel model)
        {
            var speaker = Speaker.Create(model.Salutation, model.FirstName, model.LastName, model.EMail);

            _repository.Add(speaker);
            _repository.SaveChanges();
            return(true);
        }
Exemplo n.º 2
0
 public ActionResult Create(CreateSpeakerModel model)
 {
     if (ModelState.IsValid)
     {
         if (_speakerService.CreateSpeaker(model))
         {
             return(RedirectToAction("List"));
         }
     }
     return(View());
 }