コード例 #1
0
        public bool DeleteStudent(tblStudent tblstudobj, tblStudentHistory tblstudhisobj
            {

            bool result = false;
            using (StudentInformationSystemEntities db = new StudentInformationSystemEntities())
            {
                StudentModel student = db.tblStudent.Where(x => x.ID == tblstudobj.ID).Select(x => x).FirstOrDefault();
                db.tblStudent.DeleteObject(student);
                db.SaveChanges();
                result = true;
            }
            return result;
        }