I read the book. Reached the Entity-framework. And it turns out such a problem. In the book, the class that is obtained after creating the Entity-framework element is inherited from ObjectContext
public partial class AutoLog1Entities : ObjectContext And when I create a new Entity-framework element and automatically fill it with data from a table, for some reason my class becomes DbContext successor DbContext
public partial class AutoLog1Entities : DbContext Therefore I can not do anything. Since the methods that are in ObjectContext missing in DbContext . I understand that this depends on the EF version (but this is not accurate), but I cannot find the version that uses ObjectContext instead of DbContext