SaveToDb() private method

private SaveToDb ( ) : int
return int
示例#1
0
 public ActionResult Create(AthleteClassModel model)
 {
     try
     {
         var athleteclass = new AthleteClassModel()
         {
             Name = model.Name
         };
         athleteclass.SaveToDb();
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }