public async Task <IActionResult> GetActorsAsync() { try { var actorsObj = await _actorRepo.FindAll(); var actorsDTO = _mapper.Map <IList <ActorDTO> >(actorsObj); return(Ok(actorsDTO)); } catch (Exception E) { return(StatusCode(500, "Something went wrong. please contact your admin")); } }
// // GET: /Actor/ public ActionResult Index() { var actors = _repository.FindAll(); return(View(actors.ToList())); }