public bool AddUserDetails(User_Details u) { try { db.User_Details.Add(u); db.SaveChanges(); return(true); } catch { } return(false); }
public bool EditStudent(User_Details u) { try { User_Details user = db.User_Details.Find(u.UserID); db.User_Details.Remove(user); db.User_Details.Add(u); db.SaveChanges(); return(true); } catch { } return(false); }
public bool DeleteStudent(int id) { bool status = false; try { User_Details cou = db.User_Details.Find(id); db.User_Details.Remove(cou); db.SaveChanges(); status = true; } catch { } return(status); }