示例#1
0
        public List <Hobby> DeleteHobby(Hobby hobby)
        {
            DBservices db   = new DBservices();
            int        num1 = db.GetAllHobbiesFromSQL().Count;

            db.DeleteHobby(hobby);
            List <Hobby> hobbies = db.GetAllHobbiesFromSQL();

            if (hobbies.Count + 1 == num1)
            {
                return(hobbies);
            }
            else
            {
                return(null);
            }
        }