public void Excluir(int id) { AndromedaContext ctx = new AndromedaContext(); Usuario usuario = ctx.Usuario.Find(id); ctx.Entry(usuario).State = System.Data.Entity.EntityState.Deleted; ctx.SaveChanges(); }
public void Excluir(int id) { AndromedaContext ctx = new AndromedaContext(); Comodo com = ctx.Comodo.Find(id); ctx.Entry(com).State = System.Data.Entity.EntityState.Deleted; ctx.SaveChanges(); }
public void Excluir(int id) { AndromedaContext ctx = new AndromedaContext(); Residencia res = ctx.Residencia.Find(id); ctx.Entry(res).State = System.Data.Entity.EntityState.Deleted; ctx.SaveChanges(); }
public void Excluir(int id) { AndromedaContext ctx = new AndromedaContext(); IEle ele = ctx.IEle.Find(id); ctx.Entry(ele).State = System.Data.Entity.EntityState.Deleted; ctx.SaveChanges(); }
public async Task <ActionResult> Edit([Bind(Include = "InstitucionID,Nombre")] Institucion institucion) { if (ModelState.IsValid) { db.Entry(institucion).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(institucion)); }
public async Task <ActionResult> Edit([Bind(Include = "AdministradorID,Email,Contraseña,Nombre,Lugar_trabajo,Nivel")] Administrador administrador) { if (ModelState.IsValid) { db.Entry(administrador).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(administrador)); }
public async Task <ActionResult> Edit([Bind(Include = "ExperimentoID,Nombre,Objetivo")] Experimento experimento) { if (ModelState.IsValid) { db.Entry(experimento).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(experimento)); }
public async Task <ActionResult> Edit([Bind(Include = "TelemetriaID,VueloID,Nombre,Valor")] Telemetria telemetria) { if (ModelState.IsValid) { db.Entry(telemetria).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.VueloID = new SelectList(db.Vuelos, "VueloID", "Nombre", telemetria.VueloID); return(View(telemetria)); }
public async Task <ActionResult> Edit([Bind(Include = "VueloID,AdministradorID,Nombre,Objetivo,Fecha,Ubicacion,Plataforma")] Vuelo vuelo) { if (ModelState.IsValid) { db.Entry(vuelo).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.AdministradorID = new SelectList(db.Administradores, "AdministradorID", "Email", vuelo.AdministradorID); return(View(vuelo)); }
public async Task <ActionResult> Edit([Bind(Include = "ID,InstitucionID,VueloID,ExperimentoID")] VueloInstitucionExperimento vueloInstitucionExperimento) { if (ModelState.IsValid) { db.Entry(vueloInstitucionExperimento).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.ExperimentoID = new SelectList(db.Experimentos, "ExperimentoID", "Nombre", vueloInstitucionExperimento.ExperimentoID); ViewBag.InstitucionID = new SelectList(db.Instituciones, "InstitucionID", "Nombre", vueloInstitucionExperimento.InstitucionID); ViewBag.VueloID = new SelectList(db.Vuelos, "VueloID", "Nombre", vueloInstitucionExperimento.VueloID); return(View(vueloInstitucionExperimento)); }