24.11.2012 Views

SQL Anywhere and the ADO.NET Entity Framework - Sybase

SQL Anywhere and the ADO.NET Entity Framework - Sybase

SQL Anywhere and the ADO.NET Entity Framework - Sybase

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong><br />

<strong>Framework</strong><br />

A WHITEPAPER FROM SYBASE IANYWHERE<br />

www.sybase.com/ianywhere


Contents:<br />

Introduction...............................................................................................................................................1<br />

Requirements ........................................................................................................................................................1<br />

<strong>SQL</strong> <strong>Anywhere</strong> .<strong>NET</strong> Integration Tools ......................................................................................................2<br />

Create an <strong>Entity</strong> Data Model from a <strong>SQL</strong> <strong>Anywhere</strong> Database.................................................................3<br />

View <strong>the</strong> <strong>Entity</strong> Data Model in <strong>the</strong> <strong>Entity</strong> Designer...................................................................................4<br />

Bind Data to Controls ................................................................................................................................5<br />

Extend <strong>the</strong> <strong>Entity</strong> Data Model ...................................................................................................................7<br />

O<strong>the</strong>r Data Access Methods....................................................................................................................10<br />

Object Services ....................................................................................................................................................10<br />

<strong>Entity</strong>Client Provider............................................................................................................................................11<br />

Summary <strong>and</strong> Additional Resources .......................................................................................................12<br />

Revision History<br />

Version 1.1 - July 2010<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

i


Introduction<br />

This whitepaper describes how database application developers can use <strong>SQL</strong> <strong>Anywhere</strong> 12 <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong><br />

<strong>Entity</strong> <strong>Framework</strong> to build database-driven applications. This whitepaper also describes how <strong>the</strong> Language<br />

Integrated Query (LINQ) to Entities, Object Services, <strong>and</strong> <strong>the</strong> <strong>Entity</strong>Client Provider methodologies can be<br />

used to access data stored inside a <strong>SQL</strong> <strong>Anywhere</strong> database.<br />

The <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong> is a new technology from Microsoft that simplifies <strong>the</strong> development of data<br />

aware applications <strong>and</strong> reduces <strong>the</strong> amount of code database application developers must write. Typically,<br />

databases are designed by database administrators who ensure that all information is stored in schemas<br />

optimized for data retrieval. Although <strong>the</strong>se schemas provide efficient access to data, <strong>the</strong>y are not <strong>the</strong> best<br />

method of representing <strong>the</strong> business objects required by applications. Often, programmers must design <strong>and</strong><br />

implement methods for transforming <strong>the</strong> data stored in relational systems into robust <strong>and</strong> reusable objects<br />

that are integral parts of enterprise solutions. The <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong> provides an intuitive<br />

approach to designing business logic based on relational data.<br />

The <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong> introduces <strong>the</strong> <strong>Entity</strong> Data Model (EDM) which is a conceptual view of <strong>the</strong><br />

data used in <strong>the</strong> application. Often, existing database schemas contain large amounts of data, <strong>and</strong> only a<br />

subset of this data is required by client programs. For example, a Microsoft Windows client application that<br />

processes online orders may only require information about customers, products, <strong>and</strong> orders. Instead of<br />

including all <strong>the</strong> database tables in <strong>the</strong> EDM, <strong>the</strong> developer provides only <strong>the</strong> tables that are relevant to <strong>the</strong><br />

application.<br />

Requirements<br />

The following software is required to complete <strong>the</strong> procedures in this document:<br />

• <strong>SQL</strong> <strong>Anywhere</strong> 12 or higher – obtain a free Developer Edition of <strong>SQL</strong> <strong>Anywhere</strong> from this location:<br />

http://www.sybase.com/detail?id=1016644<br />

• Microsoft Visual Studio 2008 with Service Pack 1 or higher<br />

• Microsoft .<strong>NET</strong> <strong>Framework</strong> 3.5 with Service Park 1 or higher<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

1


<strong>SQL</strong> <strong>Anywhere</strong> .<strong>NET</strong> Integration Tools<br />

The <strong>SQL</strong> <strong>Anywhere</strong> setup program automatically installs <strong>the</strong> .<strong>NET</strong> integration components to your Visual<br />

Studio 2008 installation. However, if you install Visual Studio 2008 after installing <strong>SQL</strong> <strong>Anywhere</strong>, you must<br />

install <strong>the</strong> <strong>SQL</strong> <strong>Anywhere</strong> integration tools:<br />

• Ensure Visual Studio is not running.<br />

• Open a Comm<strong>and</strong> Prompt <strong>and</strong> navigate to <strong>the</strong> following directory:<br />

C:\Program Files\<strong>SQL</strong> <strong>Anywhere</strong> 12\Assembly\v2<br />

• Run <strong>the</strong> following comm<strong>and</strong>:<br />

SetupVSPackage.exe /i<br />

If you want to un-install <strong>the</strong> integration tools:<br />

• Run <strong>the</strong> following comm<strong>and</strong> at <strong>the</strong> same directory:<br />

SetupVSPackage.exe /u<br />

2 <strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910


Create an <strong>Entity</strong> Data Model from a <strong>SQL</strong> <strong>Anywhere</strong><br />

Database<br />

A <strong>SQL</strong> <strong>Anywhere</strong> database can also be used to create a new entity data model defined in Visual Studio 2008.<br />

Follow <strong>the</strong> steps below to add <strong>the</strong> <strong>SQL</strong> <strong>Anywhere</strong> 12 Demo database as a EDM to your project.<br />

1. Right-click your project, click Add New Item > <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> Data Model.<br />

2. In <strong>the</strong> Name field, type SADemo.edmx. Click Add.<br />

3. Select Generate from database <strong>and</strong> click Next.<br />

4. Skip step 4 – 6 if <strong>the</strong> default connection is <strong>SQL</strong> <strong>Anywhere</strong>.demo12. O<strong>the</strong>rwise, click New<br />

Connection.<br />

5. In <strong>the</strong> Data source list, click <strong>SQL</strong> <strong>Anywhere</strong>. Click Continue.<br />

6. Click ODBC Data Source name <strong>and</strong> select <strong>SQL</strong> <strong>Anywhere</strong> 12 Demo. Click OK.<br />

7. Click Next.<br />

� If <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> Data Model does not show up, verify Visual Studio 2008 Service<br />

Pack 1 <strong>and</strong> Microsoft .<strong>NET</strong> <strong>Framework</strong> 3.5 with Service Pack 1 are installed properly.<br />

� If <strong>SQL</strong> <strong>Anywhere</strong> does not appear in <strong>the</strong> Data source list, verify <strong>the</strong> <strong>SQL</strong> <strong>Anywhere</strong><br />

integration components are installed properly.<br />

8. Include all database objects in <strong>the</strong> model <strong>and</strong> click Finish.<br />

� If you are using Microsoft .<strong>NET</strong> <strong>Framework</strong> 4.0, clear <strong>the</strong> Pluralize or singularize generated<br />

object names checkbox <strong>and</strong> click Finish.<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

3


View <strong>the</strong> <strong>Entity</strong> Data Model in <strong>the</strong> <strong>Entity</strong> Designer<br />

When you create an entity data model, a visual representation of <strong>the</strong> model appears in <strong>the</strong> <strong>Entity</strong> Designer.<br />

In <strong>the</strong> diagram below, <strong>the</strong> generated properties <strong>and</strong> associations match <strong>the</strong> database schema.<br />

This diagram illustrates that <strong>the</strong> entity is properly mapped to <strong>the</strong> database schema.<br />

4 <strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910


Bind Data to Controls<br />

Use <strong>the</strong> following procedure to add a single DataGridView control to display <strong>the</strong> information stored in <strong>the</strong><br />

<strong>SQL</strong> <strong>Anywhere</strong> database.<br />

LINQ to Entities are used in step 10 of this procedure to allow <strong>the</strong> use of <strong>the</strong> IntelliSense (auto completion)<br />

feature of Visual Studio. Through <strong>the</strong> use of tool tips <strong>and</strong> IntelliSense, Visual Studio can help programmers<br />

detect <strong>and</strong> avoid application runtime errors.<br />

1. On <strong>the</strong> Data menu, click Show Data Sources.<br />

2. Click Add New Data Source.<br />

3. On <strong>the</strong> Data Source Type list, click Object. Click Next.<br />

4. Exp<strong>and</strong> <strong>the</strong> Model list <strong>and</strong> click Customers. Click Next.<br />

5. Click Finish.<br />

6. In <strong>the</strong> Data Sources window, drag <strong>the</strong> Customer object to your main form. The DataGridView <strong>and</strong><br />

BindingControlNavigator controls that display <strong>the</strong> records stored in <strong>the</strong> database are generated.<br />

7. In <strong>the</strong> Load event pane of <strong>the</strong> main form, add <strong>the</strong> following code to bind <strong>the</strong> Customer object to <strong>the</strong><br />

data grid:<br />

C#<br />

var saEntities = new SA12<strong>Entity</strong><strong>Framework</strong>.Entities();<br />

// Retrieve <strong>the</strong> list of customers from <strong>the</strong> EDM<br />

var customers = saEntities.Customers;<br />

// Bind <strong>the</strong> customers object to <strong>the</strong> data grid<br />

customersBindingSource.DataSource = customers;<br />

VB.<strong>NET</strong><br />

Dim saEntities As New SA12<strong>Entity</strong><strong>Framework</strong>VB.Entities<br />

' Retrieve <strong>the</strong> list of customers from <strong>the</strong> EDM<br />

Dim customers = saEntities.Customers<br />

' Bind <strong>the</strong> customers object to <strong>the</strong> data grid<br />

CustomersDataGridView.DataSource = customers<br />

8. Run <strong>the</strong> project to view <strong>the</strong> list of customers in <strong>the</strong> data grid.<br />

9. Close <strong>the</strong> sample application.<br />

10. In <strong>the</strong> Load event pane of <strong>the</strong> main form, add <strong>the</strong> following code to display only Canadian<br />

customers in <strong>the</strong> data grid:<br />

C#<br />

var saEntities = new SA12<strong>Entity</strong><strong>Framework</strong>.Entities();<br />

// Retrieve <strong>the</strong> list of Canadian customers from <strong>the</strong> EDM<br />

var customers = from c in saEntities.Customers<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

5


where c.Country == "Canada"<br />

select c;<br />

// Bind <strong>the</strong> customers object to <strong>the</strong> data grid<br />

customersBindingSource.DataSource = customers;<br />

VB.<strong>NET</strong><br />

Dim saEntities As New SA12<strong>Entity</strong><strong>Framework</strong>VB.Entities<br />

' Retrieve <strong>the</strong> list of Canadian customers from <strong>the</strong> EDM<br />

Dim customers = From c In saEntities.Customers _<br />

Where c.Country Is "Canada" _<br />

Select c<br />

Dim saEntities As New SA12<strong>Entity</strong><strong>Framework</strong>VB.Entities<br />

' Retrieve <strong>the</strong> list of Canadian customers from <strong>the</strong> EDM<br />

Dim customers = From c In saEntities.Customers _<br />

Where c.Country Is "Canada" _<br />

Select c<br />

' Bind <strong>the</strong> customers object to <strong>the</strong> data grid<br />

CustomersDataGridView.DataSource = customers<br />

11. Run <strong>the</strong> project <strong>and</strong> verify that only Canadian customers appear.<br />

12. Close <strong>the</strong> sample application.<br />

6 <strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910


Extend <strong>the</strong> <strong>Entity</strong> Data Model<br />

The code generated for <strong>the</strong> <strong>Entity</strong> Data Model indicates that it is a partial class entity. Database application<br />

developers can extend a partial class entity to include properties <strong>and</strong> methods that complete business<br />

objects.<br />

Use <strong>the</strong> following procedure to add new class files with two methods of retrieving information to <strong>the</strong><br />

sample application. This procedure assumes that <strong>the</strong> developer cannot change <strong>the</strong> database schema. So, <strong>the</strong><br />

logic is added by extending <strong>the</strong> <strong>Entity</strong> Data Model.<br />

1. Add a new class file to <strong>the</strong> project <strong>and</strong> change <strong>the</strong> code to <strong>the</strong> following:<br />

C#<br />

namespace SA12<strong>Entity</strong><strong>Framework</strong><br />

{<br />

}<br />

public partial class Entities<br />

{<br />

}<br />

VB.<strong>NET</strong><br />

public List AvailableColours()<br />

{<br />

}<br />

var colours = (from Products p in this.Products<br />

orderby p.Color<br />

return colours.ToList();<br />

select p.Color).Distinct();<br />

public List GetColourProducts(string colour)<br />

{<br />

}<br />

var prods = from Products p in this.Products<br />

where p.Color == colour<br />

select p;<br />

return prods.ToList();<br />

Partial Public Class Entities<br />

Public Function AvailableColours() As List(Of String)<br />

Dim colours As IQueryable(Of String)<br />

colours = (From Products In Me.Products _<br />

Order By Products.Color _<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

7


Select Products.Color).Distinct()<br />

Return colours.ToList()<br />

End Function<br />

Public Function GetColourProducts(ByVal colour As String) _<br />

As List(Of Products)<br />

Dim prods As IQueryable(Of Products)<br />

prods = From Products In Me.Products _<br />

Where Products.Color Is colour _<br />

Select Products<br />

Return prods.ToList()<br />

End Function<br />

End Class<br />

2. In <strong>the</strong> pane below <strong>the</strong> data grid, add a combo box, a list box, <strong>and</strong> a Get Products button to <strong>the</strong> main<br />

form. These controls display <strong>the</strong> results of <strong>the</strong> two methods added in step 1.<br />

3. In <strong>the</strong> Load event pane of <strong>the</strong> main form, add <strong>the</strong> following code:<br />

C#<br />

VB.<strong>NET</strong><br />

var colours = saEntities.AvailableColours();<br />

// Add each colour to combo box<br />

foreach (var c in colours)<br />

{<br />

comboBox1.Items.Add(c.ToString());<br />

} // foreach<br />

Dim colours = saEntities.AvailableColours()<br />

' Add each colour to <strong>the</strong> combo box<br />

For Each c In colours<br />

Next<br />

ComboBox1.Items.Add(c.ToString())<br />

4. Add <strong>the</strong> following code to <strong>the</strong> button click event:<br />

C#<br />

listBox1.Items.Clear();<br />

string colour = comboBox1.SelectedItem.ToString();<br />

var saEntities = new SA12<strong>Entity</strong><strong>Framework</strong>.Entities();<br />

var available = saEntities.GetColourProducts(colour);<br />

// Add product to list box<br />

8 <strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910


VB.<strong>NET</strong><br />

foreach (var a in available)<br />

{<br />

listBox1.Items.Add(a.Name.ToString());<br />

} // foreach<br />

ListBox1.Items.Clear()<br />

Dim colour = ComboBox1.SelectedItem.ToString()<br />

Dim saEntities As New SA12<strong>Entity</strong><strong>Framework</strong>VB.Entities<br />

Dim available = saEntities.GetColourProducts(colour)<br />

' Add product to list box<br />

For Each a In available<br />

Next<br />

5. Run <strong>the</strong> project.<br />

ListBox1.Items.Add(a.Name.ToString())<br />

The AvailableColours method retrieves a unique list of <strong>the</strong> colours in <strong>the</strong> Products table <strong>and</strong><br />

populates <strong>the</strong> combo box. The GetColourProducts method retrieves a list of <strong>the</strong> Products entity type<br />

that matches <strong>the</strong> LINQ query.<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

9


O<strong>the</strong>r Data Access Methods<br />

In addition to LINQ to Entities, developers can use Object Services <strong>and</strong> <strong>the</strong> <strong>Entity</strong>Client Provider to access<br />

<strong>SQL</strong> <strong>Anywhere</strong> data.<br />

Object Services<br />

For this method, <strong>Entity</strong> <strong>SQL</strong> is used to query <strong>the</strong> <strong>Entity</strong> Data Model. Using Object Services minimizes <strong>the</strong><br />

amount of code required to write data access modules, <strong>and</strong> results in an object whose contents can easily<br />

be retrieved using a “for each” loop. For example, drag ano<strong>the</strong>r Listbox to <strong>the</strong> form <strong>and</strong> replace <strong>the</strong> lines in<br />

<strong>the</strong> From1_Load event with <strong>the</strong> following:<br />

C#<br />

VB.<strong>NET</strong><br />

var saEntities = new SA12<strong>Entity</strong><strong>Framework</strong>.Entities();<br />

// Query EDM using <strong>the</strong> Object Services<br />

var contacts =<br />

saEntities.CreateQuery(<br />

@"select c.GivenName, c.Surname<br />

from Entities.Contacts as c");<br />

// Add <strong>the</strong> contact's first name <strong>and</strong> last name to <strong>the</strong> list box<br />

foreach (var record in contacts)<br />

{<br />

listBox2.Items.Add(<br />

record.GetString(0) + " " + record.GetString(1));<br />

} // foreach<br />

Dim saEntities As New SA12<strong>Entity</strong><strong>Framework</strong>VB.Entities<br />

' Query EDM using Object Services<br />

Dim contacts = saEntities.CreateQuery( _<br />

Of System.Data.Common.DbDataRecord) _<br />

("select c.GivenName, c.Surname from Entities.Contacts as c")<br />

' Add <strong>the</strong> contact's first name <strong>and</strong> last name to <strong>the</strong> list box<br />

For Each record In contacts<br />

Next<br />

ListBox2.Items.Add(record.GetString(0) + " " _<br />

+ record.GetString(1))<br />

10 <strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910


<strong>Entity</strong>Client Provider<br />

For this method, <strong>Entity</strong> <strong>SQL</strong> is used in a manner similar to <strong>the</strong> method used to access data with <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong><br />

provider. Before <strong>the</strong> development of <strong>the</strong> <strong>Entity</strong> <strong>Framework</strong>, programmers developed <strong>SQL</strong> <strong>Anywhere</strong><br />

applications with <strong>ADO</strong>.<strong>NET</strong> with connection, comm<strong>and</strong>, <strong>and</strong> data reader objects. The <strong>Entity</strong>Client Provider<br />

offers a similar way of accessing data, but <strong>the</strong> <strong>Entity</strong> Data Model is queried instead of <strong>the</strong> database. When<br />

using <strong>the</strong> <strong>Entity</strong>Client Provider, programmers can use connections <strong>and</strong> comm<strong>and</strong>s in <strong>the</strong> form of<br />

“<strong>Entity</strong>Connections” <strong>and</strong> “<strong>Entity</strong>Comm<strong>and</strong>s”. For example, drag ano<strong>the</strong>r Listbox to <strong>the</strong> form <strong>and</strong> replace <strong>the</strong><br />

lines in <strong>the</strong> From1_Load event with <strong>the</strong> following:<br />

C#<br />

VB.<strong>NET</strong><br />

var saEntities = new SA12<strong>Entity</strong><strong>Framework</strong>.Entities();<br />

// Query EDM using <strong>the</strong> <strong>Entity</strong>Client provider <strong>and</strong> Entiry <strong>SQL</strong><br />

var saConn = new<br />

System.Data.<strong>Entity</strong>Client.<strong>Entity</strong>Connection("Name=Entities");<br />

var saCmd = new System.Data.<strong>Entity</strong>Client.<strong>Entity</strong>Comm<strong>and</strong>(<br />

@"select distinct p.Name from Entities.Products as p", saConn);<br />

saConn.Open();<br />

var saReader = saCmd.ExecuteReader(<br />

System.Data.Comm<strong>and</strong>Behavior.SequentialAccess);<br />

// Loop through result set <strong>and</strong> add product name to <strong>the</strong> list box<br />

while (saReader.Read())<br />

{<br />

listBox3.Items.Add(saReader.GetString(0));<br />

} // while<br />

Dim saEntities As New SA12<strong>Entity</strong><strong>Framework</strong>VB.Entities<br />

' Query EDM using <strong>the</strong> <strong>Entity</strong>Client provider <strong>and</strong> <strong>Entity</strong> <strong>SQL</strong><br />

Dim saConn As New _<br />

System.Data.<strong>Entity</strong>Client.<strong>Entity</strong>Connection("Name=Entities")<br />

Dim saCmd = New _<br />

System.Data.<strong>Entity</strong>Client.<strong>Entity</strong>Comm<strong>and</strong>( _<br />

"select distinct p.Name from Entities.Products as p", saConn)<br />

saConn.Open()<br />

Dim saReader = saCmd.ExecuteReader _<br />

(System.Data.Comm<strong>and</strong>Behavior.SequentialAccess)<br />

' Loop through result set <strong>and</strong> add product name to <strong>the</strong> list box<br />

While saReader.Read()<br />

ListBox3.Items.Add(saReader.GetString(0))<br />

End While<br />

<strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910<br />

11


Summary <strong>and</strong> Additional Resources<br />

Database application developers can use <strong>SQL</strong> <strong>Anywhere</strong> 12 to take advantage of <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong><br />

<strong>Framework</strong> technology. The <strong>SQL</strong> <strong>Anywhere</strong> integration components for Visual Studio can be used to<br />

generate <strong>Entity</strong> Data Models from a <strong>SQL</strong> <strong>Anywhere</strong> database <strong>and</strong> manipulate records. Records can be<br />

manipulated with control data binding, Object Services, <strong>the</strong> <strong>Entity</strong>Client provider, <strong>and</strong> LINQ to Entities.<br />

Database application developers can extend <strong>the</strong> generated <strong>Entity</strong> Data Model to implement <strong>the</strong> robust<br />

business logic required by today’s enterprise solutions.<br />

For additional resources such as whitepapers, tutorials, <strong>and</strong> sample code, please visit <strong>the</strong> <strong>SQL</strong> <strong>Anywhere</strong><br />

.<strong>NET</strong> Development Center available at this location:<br />

http://www.sybase.com/developer/library/sql-anywhere-techcorner/microsoft-net<br />

SYBASE, INC.<br />

WORLDWIDE HEADQUARTERS<br />

ONE SYBASE DRIVE<br />

DUBLIN, CA 94568-7902 USA<br />

Tel: 1 800 8 SYBASE<br />

www.sybase.com/ianywhere<br />

Copyright © 2010 <strong>Sybase</strong>, Inc. All rights reserved. Unpublished rights reserved under U.S. copyright<br />

laws. <strong>Sybase</strong>, <strong>and</strong> <strong>the</strong> <strong>Sybase</strong> logo are trademarks of <strong>Sybase</strong>, Inc. or its subsidiaries. All o<strong>the</strong>r<br />

trademarks are <strong>the</strong> property of <strong>the</strong>ir respective owners. ® indicates registration in <strong>the</strong> United<br />

States. Specifications are subject to change without notice. 3/10.<br />

12 <strong>SQL</strong> <strong>Anywhere</strong> <strong>and</strong> <strong>the</strong> <strong>ADO</strong>.<strong>NET</strong> <strong>Entity</strong> <strong>Framework</strong><br />

Version 1.1 - March 200910

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!