예제 #1
0
        public ActionResult GetData()
        {
            List <Client> data = db.ToList();

            return(Json(new { data = data }, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
 public ActionResult Index()
 {
     ViewBag.ClientsList = new SelectList(dbClient.ToList(), "Id", "Name");
     ViewBag.SpeciesList = new SelectList(dbSpecie.ToList(), "Id", "Nombre");
     return(View());
 }