예제 #1
0
 public ActionResult AddCountry(Country country, int id = 0)
 {
     if (ModelState.IsValid)
     {
         ModelService.AddCountry(country, id);
         return(RedirectToAction("GetCountries"));
     }
     if (id != 0)
     {
         Country c = ModelService.getCountries().FindById(id);
         return(View(c));
     }
     return(View());
 }