Exemple #1
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            BicepsTriceps bicepsTriceps = await db.BicepsTriceps.FindAsync(id);

            db.BicepsTriceps.Remove(bicepsTriceps);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public async Task <ActionResult> Edit([Bind(Include = "BicepsTricepsId,Picure,Instructions,Benefits,Sets")] BicepsTriceps bicepsTriceps)
        {
            if (ModelState.IsValid)
            {
                db.Entry(bicepsTriceps).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(bicepsTriceps));
        }
Exemple #3
0
        public async Task <ActionResult> Create([Bind(Include = "BicepsTricepsId,Picure,Instructions,Benefits,Sets")] BicepsTriceps bicepsTriceps)
        {
            if (ModelState.IsValid)
            {
                db.BicepsTriceps.Add(bicepsTriceps);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            return(View(bicepsTriceps));
        }
Exemple #4
0
        // GET: BicepsTriceps/Delete/5
        public async Task <ActionResult> Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BicepsTriceps bicepsTriceps = await db.BicepsTriceps.FindAsync(id);

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