Published Monday, December 24, 2007 3:36 AM by mtaulty

ADO.NET Data Services and CLR Namespaces

If you're seeing this error when using the webdatagen.exe tool with the Data Services CTP;

error 7001: Schema specified is not valid. Errors: (0,0) : error 0005: The 'Namespace' attribute is invalid - The value '' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2006/04/edm:TNamespaceName' - The Pattern constraint failed.

Then look to put the types that you're exposing (i.e. the T that you have fed into WebDataService<T>) into a CLR namespace.

If you're still getting the error, put the types that your type T exposes as public IQueryable members into a namespace (the same one seems to work for me).

If you're using LINQ to SQL then one way of doing that is to select your LINQ to SQL diagram and then use the property sheet;

image

to set the "Context Namespace" and "Entity Namespace" settings.

# Consuming Ado.Net Data Services from WPF Part - 1 &laquo; C# Disciples @ Sunday, February 17, 2008 12:42 PM

PingBack from http://marlongrech.wordpress.com/2008/02/17/consuming-adonet-data-services-from-wpf-part-1/

Consuming Ado.Net Data Services from WPF Part - 1 « C# Disciples