The routine can pass throughHttp://www.sybase.com/files/Technical_Documents/PanoramaRevGuide.zipDownload
In this document, SQL Anywhere 11 may appear elsewhere as SQL Anywhere Panorama.
ADO. NET 3.5 and ADO. NET object framework and support for Visual Studio 2008
In versions earlier than SQL Anywhere, Microsoft Data Access standards have been provided with rich support. Based on this foundation, SQL Anywhere 11 added ADO. NET 3.5 and ADO. NET Entity Framework (object relationship ing technology) support. SQL Anywhere Explorer (SQL Anywhere panel in Visual Studio) is also supported in Visual Studio 2008, this allows programmers to develop SQL Anywhere and UltraLite applications in a unified Visual Studio environment.
ADO. NET object framework Wizard
This example demonstrates how to use EntityClient provider, object services (object service), and lin q to entities to retrieve data in SQL Anywhere 11 through the ADO. NET data model.
Prerequisites:
• Visual maxcompute 2008
• ADO. NET Entity Framework Beta 3
• ADO. NET Entity Framework tool--CTP
• XML editor QFE
1. Start Visual Studio 2008 and enable the PanoramaEDM. sln solution.
2. In the solution browser, open the object data model DemoDB. edmx.
The EDM designer appears and displays the virtual presentation of the model based on the SQL Anywhere 11 demo database.
EDM is generated by SQL Anywhere. NET Data Provider.
3. Compile and run the routine. The main window is shown as follows.
The Data Grid object lists customers who query Data sources based on EDM objects defined for the demo database.
4. Click "Get Products ".
The product list is retrieved from the database using the EntityClient Provider. The corresponding C # code for this operation is as follows:
Var saEntities = new DemoDBModel. DemoDBEntities ();
// Query EDM using the EntityClient Provider and Entity SQL
Var saConn = new EntityConnection ("Name = DemoDBEntities ");
Var saCmd = new EntityCommand (
@ "Select distinct p. Name
FROM DemoDBEntities. Products as p ",</