public async Task <ActionResult> DeleteConfirmed(int id) { Capitan capitan = await db.Capitans.FindAsync(id); db.Capitans.Remove(capitan); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "CapitanID,Nombre,Comentarios,Licencia")] Capitan capitan) { if (ModelState.IsValid) { db.Entry(capitan).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(capitan)); }
public async Task <ActionResult> Create([Bind(Include = "CapitanID,Nombre,Comentarios,Licencia")] Capitan capitan) { if (ModelState.IsValid) { db.Capitans.Add(capitan); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(capitan)); }
// GET: Capitans/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Capitan capitan = await db.Capitans.FindAsync(id); if (capitan == null) { return(HttpNotFound()); } return(View(capitan)); }
public StarCarrier(Engine engine, Capitan capitan) : base(engine, capitan) { }
public Enterprise(Engine engine, Capitan capitan) : base(engine, capitan) { }