Not logged in : Login

About: VirtUsingMsAdoNetDataServicesWithVirtuoso     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : vos.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • VirtUsingMsAdoNetDataServicesWithVirtuoso
maker
Title
  • VirtUsingMsAdoNetDataServicesWithVirtuoso
isDescribedUsing
has creator
attachment
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataGridApp7.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataGridApp8.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataGridApp9.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_1.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_10.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_11.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_12.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_13.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_14.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_15.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_16.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_17.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_18.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_2.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_3.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_4.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_5.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_6.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_7.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_8.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtAdoNetDataServices_9.png
  • http://vos.openlinksw.com/wiki/main/VOS/VirtUsingMsAdoNetDataServicesWithVirtuoso/VirtProviderAddDSNErr.png
content
  • %VOSWARNING% %META:TOPICPARENT{name="VirtAdoNet35Provider"}% ---+ Using Microsoft ADO.Net Data Services with Virtuoso %TOC% ---++ Introduction: The goal of Microsoft ADO.NET Data Services is to enable applications to expose data as a data service that can be consumed by web clients within corporate networks and across the internet. A data service is reachable via regular HTTP requests, using standard HTTP verbs such as GET, POST, PUT and DELETE to perform CRUD operations against the service. The payload format used by the service is controllable by the application, but all options are simple, open formats such as JSON and Atom/APP. The use of web-friendly technologies make ADO.NET Data Services ideal as a data back-end for AJAX-style applications, Rich Interactive Applications and other applications that need to operate against data that is stored across the web. ---++ Getting Started: Creating Data Services ---+++ Pre-requisites In order to create a data service using ADO.NET Data Services in your own environment you will need: 1 Microsoft Visual Studio 2008 SP1, the ADO.NET Entity Framework runtime and associated tools are included in Visual Studio 2008 SP1. 1 A running Virtuoso Universal Server instance. ---+++ Selecting a Data Source The ADO.NET Data Service server framework is comprised of two halves. The top-half is the runtime itself; this part is ?fixed?, and it implements URI translation, the Atom/JSON wire formats, the interaction protocol, etc. This is what makes an ADO.NET Data Service look like an ADO.NET Data Service. The bottom half is the data-access layer and is pluggable. Communication between layers happens in terms of the IQueryable interface plus a set of conventions to map CLR graphs into the URI/payload patterns of ADO.NET Data Services. The first step in creating an ADO.NET Data Service is to determine the data source that is to be exposed as a set of REST-based endpoints (i.e., select or create a data access layer). For relational data stored in Microsoft SQL Server or other 3rd Party databases, ADO.NET Data Services currently enables easily exposing a conceptual model created using the ADO.NET Entity Framework (EF). For all other data sources (XML document, web service, application logic layer, etc) or to use additional database access technologies (ex. LINQ to SQL), a mechanism is provided which enables any data source, as per the plug-in model described above, to be exposed as an ADO.NET Data Service. To create a data service which exposes a relational database through an Entity Framework conceptual model see ?Creating a Data Service using the ADO.NET Entity Framework?. To create a data service which exposes another data source see ?Creating a Data Service from any Data Source?. ---+++ Creating a Data Service using the ADO.NET Entity Framework ADO.NET Data Services are a specialized form of Windows Communication Foundation services, and thus can be hosted in various environments. The below example will create an ADO.NET Data Service which is hosted inside an ASP.NET site. In order to create a data service, you must first create a web project; you will then need to establish a connection with the database that will be exposed by the service, and then create the data service itself within the web application. Below is a step-by-step description of this process. The following steps can be used for creating a Data Service using the Virtuoso ADO.Net Provider for accessing the sample Northwind Demo database: 1 Launch the Visual Studio 2008 SP1 IDE. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_1.png" style="wikiautogen"/>%BR%%BR% 1 Create a <b>Web Application</b> project by going to the <b>File</b> menu in Visual Studio and choosing <b>New Project</b>. %BR%%BR% 1 When the New Project window appears, choose either <b>Visual Basic</b> or <b>Visual C#</b> as the programming language.%BR%%BR% 1 Within the language category click on <b>Web</b>, and select <b>ASP.NET Web Application</b> from the right-hand panel. %BR%%BR% 1 Choose a name for the project, for example <b><nop>VirtuosoDataService</b>, and click <b>OK</b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_2.png" style="wikiautogen"/>%BR%%BR% 1 This will create a new project called <b><nop>VirtuosoDataService</b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_3.png" style="wikiautogen"/>%BR%%BR% 1 Right click on the <b><nop>VirtuosoDataService</b> project name of the <b>Solution Explorer</b> pane, then select the <b>Add</b> -> <b>New Item</b> menu options. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_4.png" style="wikiautogen"/>%BR%%BR% 1 The <b>Add New Item</b> dialog will appear, choose the <b>ADO.NET Entity Data Model</b> template, give it the name <b>Virtuoso.edmx</b> and click <b>Add</b> to start the creation of the ADO.Net Entity Data Model. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_5.png" style="wikiautogen"/>%BR%%BR% 1 In the <b>Entity Data Model Wizard</b> dialog <b>Choose Model Contents</b> page select the <b>Generate from Database</b> model type and click <b>Next</b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_6.png" style="wikiautogen"/>%BR%%BR% 1 In the <b>Entity Data Model Wizard</b> dialog <b>Choose your Data Connection</b> page select the <b>New Connection</b> button %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_7.png" style="wikiautogen"/>%BR%%BR% 1 In the <b>Choose Data Source</b>dialog, select the <b>OpenLink Virtuoso Data Source</b> from the list displayed and click <b>Continue</b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_8.png" style="wikiautogen"/>%BR%%BR% 1 In the <b>Add Connection</b> dialog, specify the <b>hostname</b>, <b>portno</b>, <b>username</b>, and <b>password</b> for the target Virtuoso Server and check the <b>Save Password</b> check box. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataGridApp7.png" style="wikiautogen"/>%BR%%BR% 1 Select the <b>Select Database From List</b> radio button and choose <b>Demo</b> from the drop down list, assuming the Virtuoso Demo Database is installed. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataGridApp8.png" style="wikiautogen"/>%BR%%BR% 1 Click the <b>Test Connection</b> button to verify the connection is successful and then click <b>OK</b> to add the connection.%BR% %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataGridApp9.png" style="wikiautogen"/>%BR%%BR% 1 Set the <b>entity connect string</b> name to <b>VirtuosoDemoEntities</b> (note this name as it is required in step 17 below) and click <b>Next</b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_12.png" style="wikiautogen"/>%BR%%BR% 1 In the <b>Choose your Database Objects</b> page select the <b>Tables</b> check box to select all tables in the Demo database for addition to the Entity Data Model, set the <b>Model Namespace</b> to <b>VirtuosoDemoModel</b> and click <b>Finish</b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_13.png" style="wikiautogen"/>%BR%%BR% 1 The <b>Virtuoso.edmx</b> EDM will be created with the tables and relationships displayed in the Visual Studio IDE %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_14.png" style="wikiautogen"/>%BR%%BR% 1 Right click on the <b><nop>VirtuosoDataService</b> project name of the <b>Solution Explorer</b> pane, then select the <b>Add</b> -> <b>New Item</b> menu options. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_4.png" style="wikiautogen"/>%BR%%BR% 1 The <b>Add New Item</b> dialog will appear, choose the <b>ADO.NET Data Service</b> template, give it the name <b>Virtuoso.svc</b> and click <b>Add</b> to create the ADO.Net Data Service. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_15.png" style="wikiautogen"/>%BR%%BR% 1 In the <b>Virtuoso.svc.cs</b> Data Service file created add the data source class name of <b>VirtuosoDemoEntities</b> (note this is the name set in step 12) as the <b>DataService</b> name and enable the access to the Data Service by adding the entry <b>config.SetEntitySetAccessRule("*", EntitySetRights.All);</b> in the <b>InitializeService</b> method. <verbatim> // C# using System; using System.Web; using System.Collections.Generic; using System.ServiceModel.Web; using System.Linq; using System.Data.Services; namespace SimpleDataService { public class Northwind : DataService<VirtuosoDemoEntities> { public static void InitializeService(IDataServiceConfiguration config) { config.SetEntitySetAccessRule("*", EntitySetRights.All); } } } </verbatim> %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_16.png" style="wikiautogen"/>%BR%%BR% 1 To test the Data Service, simply hit <b>Ctrl+F5</b> within Visual Studio, which will start the development web server, run the Data Services server inside and load a Web browser page displaying the list of available tables/entities of the Demo database. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_17.png" style="wikiautogen"/>%BR%%BR% 1 To access a specific entity instance like the <b>Customers</b> table <b>ALFKI</b> record, this would be specified as <b><code><nowiki>http://host/vdir/Virtuoso.svc/Customers('ALFKI')</nowiki></code></b>. %BR%%BR%<img src="%ATTACHURLPATH%/VirtAdoNetDataServices_18.png" style="wikiautogen"/>%BR%%BR% ---++ NOTES 1 <b>Important</b> - To view <b>Atom</b> (the default format returned by an ADO.NET Data Service) in Internet Explorer, you must first ensure that <b>Feed Reading View</b> is turned <b>off</b> . This can be done on the <b>Content tab</b> of <b>Tools<b> in <b>Internet Options</b>.%BR%%BR% 1 If a Data Services entity instance URI page fails to load you can turn <b>Verbose</b> errors on by adding <b>config.UseVerboseErrors = true;</b> in the <b><code><nowiki>virtuoso.svc.cs InitializeService</nowiki></code></b> method to obtain more detailed information from the server as to why the page failed to load: <verbatim> public static void InitializeService(IDataServiceConfiguration config) { config.UseVerboseErrors = true; config.SetEntitySetAccessRule("*", EntitySetRights.All); } </verbatim>
id
  • 184bac3b1ff13318aea6f30aee505a5e
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • VirtUsingMsAdoNetDataServicesWithVirtuoso
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:38:43Z
atom:updated
  • 2017-06-29T07:41:48Z
topic
is made of
is container of of
is link of
is http://rdfs.org/si...vices#services_of of
is creator of of
is atom:entry of
is atom:contains of
Faceted Search & Find service v1.17_git150 as of Jan 20 2025


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3332 as of Sep 11 2024, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 776 MB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2025 OpenLink Software