Visual Basic 2015 Unleashed by Alessandro Del Sole
Author:Alessandro Del Sole [Del Sole, Alessandro]
Language: eng
Format: azw3
Publisher: Pearson Education
Published: 2015-07-25T04:00:00+00:00
* * *
The content of the MDL is quite simple, in that each ScalarProperty represents an entity’s property and establishes mapping between the property and the related column name in the database table.
Understanding the DbContext Class: The Visual Basic Mapping
Schemas in the Entity Data Model have a Visual Basic counterpart that enables 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. You will see two files with a .tt extension, Northwind.Context.tt and Northwind.tt. Files with a .tt extension are templates that Visual Studio uses for code generation and that are useful to the IDE to generate classes that allow developers to interact with the object model. Regardless of their content, which you are not required to understand for this chapter, start expanding the Northwind.Context.tt file, which contains another file called Northwind.Context.vb. Similar to the DataContext class in LINQ to SQL, the ADO.NET Entity Framework provides a class named System.Data.Entity.DbContext. This class, also referred to as the object context, is also the basis of the Code First pattern; It 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 track of changes, and persisting data back to the database. DbContext is just the base class (as the DataContext is in LINQ to SQL) that every entity data model inherits from. Listing 26.4 shows how the object context is defined in our specific scenario.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12587)
Hello! Python by Anthony Briggs(9924)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9800)
The Mikado Method by Ola Ellnestam Daniel Brolund(9784)
Dependency Injection in .NET by Mark Seemann(9347)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7770)
Grails in Action by Glen Smith Peter Ledbrook(7704)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7565)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7137)
Microservices with Go by Alexander Shuiskov(6899)
Practical Design Patterns for Java Developers by Miroslav Wengner(6817)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6757)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6422)
Angular Projects - Third Edition by Aristeidis Bampakos(6175)
The Art of Crafting User Stories by The Art of Crafting User Stories(5697)
NetSuite for Consultants - Second Edition by Peter Ries(5628)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5440)
Kotlin in Action by Dmitry Jemerov(5072)
