Should not have to define it yourself. AddObject() is part of ObjectSet class. Your entity might be differently named. I recall an error in the book (Dinners versus Dinner). Review the steps to create the entity and pay careful attention to the name you use.
Or, look in NerdDinner.Designer.cs This is what my Dinners looks like. Don't touch anything in this file, unless you really know what you're doing. It is meant to be changed only by the designer.
Code:
public ObjectSet<Dinner> Dinners
{
get
{
if ((_Dinners == null))
{
_Dinners = base.CreateObjectSet<Dinner>("Dinners");
}
return _Dinners;
}
}
private ObjectSet<Dinner> _Dinners;