// GET: Cuestionario public ActionResult Index() { List <Models.Quejas> Sugerencias = new List <Models.Quejas>(); using (var db = new Models.FDSContext()) { Sugerencias = db.Quejas.ToList(); } return(View("lista", Sugerencias)); }
public ActionResult Create(Models.Quejas Cuestionario) { try { // TODO: Add insert logic here using (var db = new Models.FDSContext()) { db.Quejas.Add(Cuestionario); db.SaveChanges(); } return(RedirectToAction(nameof(Index))); } catch (Exception ex) { //return RedirectToRoute("Index", new Models.Quejas()); return(View()); } }