the object relational designer
TRANSCRIPT
![Page 1: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/1.jpg)
The Object Relational Designer
![Page 2: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/2.jpg)
The Object Relational Designer
• A graphical user tool for generating entity classes that runs inside of Visual Studio.
• This tool is called the Object Relational Designer, but you will commonly see it referred to as the LINQ to SQL Designer, the O/R Designer, or even DLinq Designer.
• SQLMetal is designed to generate entity classes for all tables in a database.
• For a more selective approach with a graphical user interface, the Object Relational Designer is just the ticket.
• The designer gives the developer drag and drop design-time entity class modeling.
![Page 3: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/3.jpg)
![Page 4: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/4.jpg)
![Page 5: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/5.jpg)
![Page 6: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/6.jpg)
Connecting the DataContext to the Database
![Page 7: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/7.jpg)
![Page 8: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/8.jpg)
![Page 9: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/9.jpg)
![Page 10: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/10.jpg)
![Page 11: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/11.jpg)
Adding an Entity Class
![Page 12: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/12.jpg)
![Page 13: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/13.jpg)
![Page 14: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/14.jpg)
referred to as an association in LINQ to SQL, between the Customers and Orders tables, as defined by the FK_Orders_Customers foreign key constraint that exists in the Northwind database.
![Page 15: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/15.jpg)
did not specify any connection information when instantiating the NorthwindDataContext object.
![Page 16: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/16.jpg)
![Page 17: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/17.jpg)
![Page 18: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/18.jpg)
![Page 19: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/19.jpg)
We will Add Insert Store Procedure
![Page 20: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/20.jpg)
![Page 21: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/21.jpg)
![Page 22: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/22.jpg)
![Page 23: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/23.jpg)
![Page 24: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/24.jpg)
![Page 25: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/25.jpg)
![Page 26: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/26.jpg)
![Page 27: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/27.jpg)
![Page 28: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/28.jpg)
![Page 29: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/29.jpg)
![Page 30: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/30.jpg)
![Page 31: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/31.jpg)
![Page 32: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/32.jpg)
Use SQLMetal and the O/R Designer Together
![Page 33: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/33.jpg)
• Because SQLMetal’s DBML intermediate file format shares the same XML schema as the Object Relational Designer’s format, it is completely possible to use them together.
• you could generate a DBML intermediate file for a database using SQLMetal, and then load that file into the O/R Designer to tweak any entity class or entity class property names you desire. This approach provides a simple way to generate entity classes for an entire database, yet makes it simple to modify what you would like.
![Page 34: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/34.jpg)
Part-2
![Page 35: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/35.jpg)
• LINQ to SQL, a new part of ADO.NET that supports Language Integrated Query, allowing you to query and manipulate objects associated with database tables.
• It eliminates the traditional mismatch between database tables and your application’s domain-specific object model, freeing you to work with data as objects while the framework manages the rest.
![Page 36: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/36.jpg)
![Page 37: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/37.jpg)
![Page 38: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/38.jpg)
![Page 39: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/39.jpg)
![Page 40: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/40.jpg)
![Page 41: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/41.jpg)
![Page 42: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/42.jpg)
![Page 43: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/43.jpg)
![Page 44: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/44.jpg)
![Page 45: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/45.jpg)
![Page 46: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/46.jpg)
![Page 47: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/47.jpg)
Ordering and filtering in LINQ queries by using built-in string functions inside your
LINQ queries
![Page 48: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/48.jpg)
![Page 49: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/49.jpg)
Aggregating data in LINQ queries
![Page 50: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/50.jpg)
![Page 51: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/51.jpg)
![Page 52: The Object Relational Designer](https://reader034.vdocuments.us/reader034/viewer/2022051012/546530cab4af9f1a1a8b45c7/html5/thumbnails/52.jpg)
The end