An ADO.Net Data Service for the Microsoft Access Northwind tables can be created using the Entity Data Model created in the Creating EDM in Visual Studio 2008 section.
Virtuoso.svc
and click Add to create the ADO.Net Data Service.
Virtuoso.svc.cs
Data Service file, add the data source class name of VirtuosoEntities
(note this is the name set in the Creating EDM in Visual Studio 2008 section) as the config.SetEntitySetAccessRule("*", EntitySetRights.All);
to the InitializeService
method.
// 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); } } }
http://host/vdir/Virtuoso.svc/Customers('ALFKI')
. config.UseVerboseErrors = true;
in the virtuoso.svc.cs InitializeService
method to obtain more detailed information from the server as to why the page failed to load:
public static void InitializeService(IDataServiceConfiguration config) { config.UseVerboseErrors = true; config.SetEntitySetAccessRule("*", EntitySetRights.All); }
CategoryDocumentation CategoryVirtuoso CategoryEntityFramework? CategoryDotNET CategoryODBC CategoryODBCODBCBridge