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