ADO.NET Entity Framework 4.0 & Introduction to Quadrant
Introducing Quadrant
- Quadrant is optimized for developers who work with SQL Server Databases
- There is an "M" language to connect various SQL Server Databases
- There are windows called workpads to help you work with databases within Quadrant
- You use a "session" to view and edit data
- There are various "viewers" to look at data (simple lists, properties, tables, etc)
Previous Blog Entries
- https://blogs.msdn.com/brunoterkaly/archive/2010/01/30/ado-net-entity-framework-and-net-4-visual-studio-2010-modeling-tools-writing-code-and-working-with-entities-to-add-data.aspx
- https://blogs.msdn.com/brunoterkaly/archive/2010/01/25/ado-net-entity-framework-and-net-4-how-to-use-visual-studio-2010-modeling-tools-to-build-a-database.aspx
Using Quadrant to explore our data
The reasons why Quadrant is interesting – Many reasons, but this is an “Intro”
- Data can be viewed in a variety of viewers: as a simple list, a set of properties, a table, a diagram, or as a tree of expandable nodes
- You can change the viewer of any workpad. This allows you to either see different data or to see the data in a new way.
- List Viewer
- Table Viewer
- Properties Viewer
- Tree Viewer
- Master/Detail Viewer
- Tree Master/Detail Viewer
- Diagram Viewer
- You can change the viewer of any workpad. This allows you to either see different data or to see the data in a new way.
Purpose of Screen: To start QuadrantHow To Get This Screen: : Run as administrator |
The Default Workspace
Quadrant does not open a database automatically
One of the first things you’ll want to do is open a new “session.” A session will allow you to interact with a database.
Purpose of Screen: What you first see when you start QuadrantHow To Get This Screen: : Just start Quadrant |
Starting a New Session
A session allows you to interact with a database.
- Select “File / New / Session”
Purpose of Screen: How to start a new sessionHow To Get This Screen: : Always available within Quadrant |
Selecting the right server
I will not connect to “.\SQLEXPRESS” because our data resides with the “(local”)
- Usually there are two server instances running (SQLEXPRESS and (local))
Purpose of Screen: To select the correct server (we want “(local)”)How To Get This Screen: : File / New / Session |
Select “BlogDB” as the database – We created this previously
You must do this after selecting “(local)” for the server.
- We are interested in the previous two blog entries that built “BlogDB”
- https://blogs.msdn.com/brunoterkaly/archive/2010/01/30/ado-net-entity-framework-and-net-4-visual-studio-2010-modeling-tools-writing-code-and-working-with-entities-to-add-data.aspx
- https://blogs.msdn.com/brunoterkaly/archive/2010/01/25/ado-net-entity-framework-and-net-4-how-to-use-visual-studio-2010-modeling-tools-to-build-a-database.aspx
Purpose of Screen: Selecting the right databaseHow To Get This Screen: : Start a new database session |
BlogDB is in the database explorer
The “Explorer” lets your browse the structure and data of your database.
- Notice that “BlogDB” is the database we choose
- Makes the most sense in scenarios
Purpose of Screen: Show database explorer with BlogDB How To Get This Screen: : Available after you start a new “Session” |
Table Listing
Note that “BlogDB” has a variety of tables listed
- If you double click on a table, a view will fire up and allow you to interact with the data
Purpose of Screen: List of tables in BlogDBHow To Get This Screen: : Expand the “Database” Node of the “Explorer” window |
“Blogs” Table
A simple view is presented of the Blogs table
- You can edit the “Name” or “Owner” columns
Purpose of Screen: Quadrant showing a table How To Get This Screen: : From the Explorer Window double click on a table to edit it |
Edit a Record
The point with Quadrant is the you can browse and edit any database without typing a query
- We are looking at the Table Viewer
Purpose of Screen: Showing the first row of the Blogs tableHow To Get This Screen: : Double-clicking on a row in the Blogs table |
View the “Posts” table
Navigating to child tables is easy:
- Go to the “Blogs” table and click on References (how child record are accessed)
Purpose of Screen: Displaying Posts, which is the Child Table How To Get This Screen: : From the Blogs table, click the “Posts” under “References” |
Editing Data in the “Posts” Child Table
Now that the “Posts” table is visible, the data can be edited.
- Simply click in a column/row combination for editing
Purpose of Screen: Editing a child table (Posts)How To Get This Screen: : Double click “Posts” under “References” for the “Blogs” table |
How to change your view
As explained previously, there are several view types. You can change the view by click on the down arrow in the upper right part of the window.
More Help
Tutorials are available
The following link below provides more learning resources:
- How to: Install the "Quadrant" Sample Data
- How to: Use Viewers in "Quadrant"
- "Quadrant" Pet Shop Tutorial
- "Quadrant" Advanced Customization Tutorial
- Configure “Quadrant” by using “M” code
Purpose of Screen: Some tutorials available for QuadrantHow To Get This Screen: : https://msdn.microsoft.com/en-us/library/dd857529(VS.85).aspx |
Conclusions
Introduction to Quadrant
We learned:
- The basics of Quadrant
- How to start a new session
- How to browse tables and identify relationships
- How to change your view of data