public virtual ActionResult Edit(project project)
 {
     if (ModelState.IsValid)
     {
         db.Entry(project).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(project);
 }
        public virtual ActionResult Create(project project)
        {
            if (ModelState.IsValid)
            {
                db.projects.Add(project);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(project);
        }
        public virtual ActionResult Edit(project model)
        {
            if (ModelState.IsValid)
            {
                var scores = db.scores
                    .Where(s => s.ProjectId == model.Id)
                    .ToList();
                db.scores.RemoveRange(scores);
                db.scores.AddRange(model.scores);

                model.scores = null;
                db.Entry(model).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(model);
        }