Пример #1
0
        //
        // GET: /WindTemplate/Delete/5

        public ActionResult Delete(int id)
        {
            IRepository <Models.Wind> repo = new WindRepository();

            repo.Delete(repo.GetById(id));
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     try
     {
         // TODO: Add delete logic here
         IRepository <Models.Wind> repo = new WindRepository();
         repo.Delete(repo.GetById(id));
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Пример #3
0
        //
        // GET: /WindTemplate/Edit/5

        public ActionResult Edit(int id)
        {
            IRepository <Wind> repo = new WindRepository();

            return(View(repo.GetById(id)));
        }