public bool ChangeStatusEmployee(long id, bool?status) { try { var user = db.Members.Find(id); user.Status = status; db.SaveChanges(); return(true); } catch { return(false); } }
public bool?updateStatus(int id) { var emp = db.Members.Find(id); emp.Status = !emp.Status; db.SaveChanges(); return(!emp.Status); }