public ActionResult Index()
        {
            var model     = comentarioService.GetAll();
            var viewModel = Mapper.Map <List <ComentarioViewModel> >(model);

            return(View(viewModel));
        }
Beispiel #2
0
 public IActionResult GetAll(Guid id)
 {
     if (ModelState.IsValid)
     {
         return(Ok(comentarioService.GetAll(id)));
     }
     return(BadRequest());
 }
 public IActionResult Get()
 {
     return(Json(
                _comentarioService.GetAll()
                ));
 }