O'Reilly logo

Visual Basic 2010 Unleashed by Alessandro Del Sole

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the ObjectContext class: The Visual Basic Mapping

Schemas in the Entity Data Model have a Visual Basic counterpart that effectively allows you to write code to work against entities. To understand this, enable the View All Files view in Solution Explorer and expand the Northwind.edmx file. Finally, open the Northwind.designer.vb code file. Similar to the DataContext class in LINQ to SQL, the ADO.NET Entity Framework provides a class named System.Data.Objects.ObjectContext. This class, also referred to as the object context, acts as a reference to the Entity Data Model and encapsulates the entities’ definition so that you can work with entities. It is also responsible for opening and closing connections, persisting data, keeping ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required