SQL Anywhere 11 (Panorama) review guide Part VIII_Mssql series

Source: Internet
Author: User

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 ",</

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.