public ActionResult Create(Activity activity) { if (ModelState.IsValid) { try { _repository.Add(activity); _repository.Save(); return RedirectToAction("Index"); } catch { return View(activity); } } else { return View(activity); } }
private void detach_Activities(Activity entity) { this.SendPropertyChanging(); entity.Sport = null; }
private void attach_Activities(Activity entity) { this.SendPropertyChanging(); entity.Sport = this; }
partial void DeleteActivity(Activity instance);
partial void UpdateActivity(Activity instance);
partial void InsertActivity(Activity instance);