public override bool Equals(System.Object otherMenuItemIngredient) { if (!(otherMenuItemIngredient is MenuItemIngredient)) { return(false); } else { MenuItemIngredient newMenuItemIngredient = (MenuItemIngredient)otherMenuItemIngredient; bool idEquality = this.GetId().Equals(newMenuItemIngredient.GetId()); bool ingredientDescriptionEquality = this.GetIngredientDescription().Equals(newMenuItemIngredient.GetIngredientDescription()); bool menuItemsIdEquality = this.GetMenuItemsId().Equals(newMenuItemIngredient.GetMenuItemsId()); bool storeIdEquality = this.GetStoreId().Equals(newMenuItemIngredient.GetStoreId()); return(idEquality && ingredientDescriptionEquality && menuItemsIdEquality && storeIdEquality); } }