Exemplo n.º 1
0
        /// <summary>
        /// DeleteVolunteerContext - Will do a soft delete (make inactive) by VolID
        /// </summary>
        /// <param name="_cVolunteer"></param>
        public void DeleteVolunteerContext(sp_Volunteer_DM _cVolunteer)
        {
            using (VolTeerEntities context = new VolTeerEntities())
            {
                var VolunteerToRemove = (from n in context.tblVolunteers where n.VolID == _cVolunteer.VolID select n).FirstOrDefault();
                VolunteerToRemove.ActiveFlg = false;
                context.sp_Volunteer_Update(VolunteerToRemove.VolID, VolunteerToRemove.ActiveFlg, VolunteerToRemove.VolFirstName,
                    VolunteerToRemove.VolMiddleName, VolunteerToRemove.VolLastName);
                context.SaveChanges();

            }
        }