コード例 #1
0
 public ActionResult Delete(int id, FormCollection collection)
 {
     if (GetAuthorization())
     {
         try
         {
             _countryService.Delete(id);
             _countryService.SaveChanges();
             return(RedirectToAction("Index"));
         }
         catch
         {
             InitializeViews(id);
             return(RedirectToAction("Index"));
         }
     }
     else
     {
         return(RedirectToLogOn());
     }
 }