Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Inspiration_Profiles inspiration_Profiles = db.Inspiration_Profiles.Find(id);

            db.Inspiration_Profiles.Remove(inspiration_Profiles);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "ID,Nombre,email")] Inspiration_Profiles inspiration_Profiles)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inspiration_Profiles).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(inspiration_Profiles));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "ID,Nombre,email")] Inspiration_Profiles inspiration_Profiles)
        {
            if (ModelState.IsValid)
            {
                db.Inspiration_Profiles.Add(inspiration_Profiles);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(inspiration_Profiles));
        }
Beispiel #4
0
        // GET: Inspiration_Profiles/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Inspiration_Profiles inspiration_Profiles = db.Inspiration_Profiles.Find(id);

            if (inspiration_Profiles == null)
            {
                return(HttpNotFound());
            }
            return(View(inspiration_Profiles));
        }
Beispiel #5
0
        public ActionResult GetBooksByInspirationProfiles(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Inspiration_Profiles inspiration_Profiles = (from i in db.Inspiration_Profiles
                                                         where i.ID == id
                                                         select i).FirstOrDefault();


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