Skip to content

Instantly share code, notes, and snippets.

Last active Dec 10, 2015
What would you like to do?
public ActionResult JsonQuery<T>(IEnumerable<T> resultado, Func<IEnumerable<T>, PartialViewResult> partialView)
if (resultado.Any()) return partialView(resultado); //instancia a PartialViewResult
return Json(string.Empty, JsonRequestBehavior.AllowGet);
return JsonQuery(resultado, x => PartialView("ResultadosDaPesquisa", x));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment