Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SpeciesAustralia speciesAustralia = db.SpeciesAustralias.Find(id);

            db.SpeciesAustralias.Remove(speciesAustralia);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,Scientific_Name,Common_Name,Threatened_status,Kingdom,Phylum,Class,Family,Genus,Species,Grouping,Present_,StateCode,Country,StateCountry,State_Name")] SpeciesAustralia speciesAustralia)
 {
     if (ModelState.IsValid)
     {
         db.Entry(speciesAustralia).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(speciesAustralia));
 }
Exemplo n.º 3
0
        // GET: SpeciesAustralias/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SpeciesAustralia speciesAustralia = db.SpeciesAustralias.Find(id);

            if (speciesAustralia == null)
            {
                return(HttpNotFound());
            }
            return(View(speciesAustralia));
        }