Exemple #1
0
 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);
     }
 }
Exemple #2
0
		private void detach_Activities(Activity entity)
		{
			this.SendPropertyChanging();
			entity.Sport = null;
		}
Exemple #3
0
		private void attach_Activities(Activity entity)
		{
			this.SendPropertyChanging();
			entity.Sport = this;
		}
Exemple #4
0
 partial void DeleteActivity(Activity instance);
Exemple #5
0
 partial void UpdateActivity(Activity instance);
Exemple #6
0
 partial void InsertActivity(Activity instance);