Пример #1
0
        public ActionResult InviteVolunteer(int volid, int proid)
        {
            Volunteer        volunteer = db.Volunteers.Find(volid);
            VolunteerProject project   = db.VolunteerProjects.Find(proid);

            volunteer.AddInvite(project);
            db.Entry(project).State   = EntityState.Modified;
            db.Entry(volunteer).State = EntityState.Modified;
            db.SaveChanges();
            return(RedirectToAction("Volunteer", "Organization", new { id = volunteer.ID }));
        }