public ActionResult Create(ProjectVolunteer projectvolunteer)
        {
            if (ModelState.IsValid)
            {
                db.ProjectVolunteers.Add(projectvolunteer);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.ProjectId = new SelectList(db.Projects, "ProjectId", "Type", projectvolunteer.ProjectId);
            //ViewBag.VolunteerId = new SelectList(db.Volunteers, "VolunteerId", "SignUpPartyId", projectvolunteer.VolunteerId);
            var volunteers = db.Volunteers.Select(v => new { v.VolunteerId, Name = v.FirstName + " " + v.LastName });

            ViewBag.VolunteerId = new SelectList(volunteers, "VolunteerId", "Name");
            return View(projectvolunteer);
        }
 public ActionResult Edit(ProjectVolunteer projectvolunteer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(projectvolunteer).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ProjectId = new SelectList(db.Projects, "ProjectId", "Type", projectvolunteer.ProjectId);
     ViewBag.VolunteerId = new SelectList(db.Volunteers, "VolunteerId", "SignUpPartyId", projectvolunteer.VolunteerId);
     return View(projectvolunteer);
 }