public ActionResult GetData() { List <Client> data = db.ToList(); return(Json(new { data = data }, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { ViewBag.ClientsList = new SelectList(dbClient.ToList(), "Id", "Name"); ViewBag.SpeciesList = new SelectList(dbSpecie.ToList(), "Id", "Nombre"); return(View()); }