public int UpdateStudentData(Student student, bool isDelete) { List <int?> result = null; try { using (demoEntities db = new demoEntities()) { result = db.UpdateStudent(student.Id, student.Name, student.Address, student.Mobile, student.Stream, isDelete); } } catch (Exception ex) { } return((int)result[0]); }