public ActionResult Index() { var model = comentarioService.GetAll(); var viewModel = Mapper.Map <List <ComentarioViewModel> >(model); return(View(viewModel)); }
public IActionResult GetAll(Guid id) { if (ModelState.IsValid) { return(Ok(comentarioService.GetAll(id))); } return(BadRequest()); }
public IActionResult Get() { return(Json( _comentarioService.GetAll() )); }