예제 #1
0
 public void AddActor(ActorDto dto)
 {
     var entity = new Actor();
     entity.Name = dto.Name;
     entity.Surname = dto.Surname;
     _actorRepository.Add(entity);
     _actorRepository.Save();
 }
예제 #2
0
 public ActionResult Create(ActorDto actor)
 {
     try
     {
         _actorService.AddActor(actor);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }