public static int Insert(City city) { var db = DataBaseHelper.Open(); city.Id = LastIdSvc.GetNextTableId("Cities"); db.Cities.Insert(city); return city.Id; }
public ActionResult Create(City model) { CitySvc.Insert(model); return RedirectToAction("Index"); }