public ActionResult Create(Activity activity, string username)
        {
            if (ModelState.IsValid)
            {
                // make sure it's not hacked by script kiddies
                activity.Username = username;
                context.Activities.Add(activity);
                context.SaveChanges();
                return RedirectToAction("Index");  
            }

            return View(activity);
        }
 public ActionResult Edit(Activity activity)
 {
     if (ModelState.IsValid)
     {
         context.Entry(activity).State = EntityState.Modified;
         context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(activity);
 }