I deleted your attachment, sorry but it contained a lot of dlls. Instead I'm attaching a working example based on yours.
The problem, I think, is that you are using the TwoClasses preset, which I think is a limitation. I have to confirm that though.
If you use the decorator to include exception info ([ServiceBehavior(IncludeExceptionDetailInFaults = true)]) and set the verbose errors on (config.UseVerboseErrors = true
, you can see the exception:
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code/>
<message xml:lang="en-US">An error occurred while processing this request.</message>
<innererror>
<message>
The entity type 'Northwind.Linq.CustomerEntity' does not have any key properties. Please make sure the key properties are defined for this entity type.
</message>
<type>System.InvalidOperationException</type>
<stacktrace>
at System.Data.Services.Providers.ResourceType.ValidateType()
at System.Data.Services.Providers.ResourceType.get_PropertiesDeclaredOnThisType()
at System.Data.Services.Providers.ResourceType.InitializeProperties()
at System.Data.Services.Providers.ResourceType.get_EpmIsV1Compatible()
at System.Data.Services.Providers.ResourceSetWrapper.EpmIsV1Compatible(DataServiceProviderWrapper provider)
at System.Data.Services.RequestDescription.UpdateAndCheckEpmFeatureVersion(ResourceSetWrapper resourceSet, IDataService service)
at System.Data.Services.RequestDescription.UpdateAndCheckEpmFeatureVersion(IDataService service)
at System.Data.Services.RequestUriProcessor.ProcessRequestUri(Uri absoluteRequestUri, IDataService service)
at System.Data.Services.DataService`1.ProcessIncomingRequestUri()
at System.Data.Services.DataService`1.HandleRequest()
</stacktrace>
</innererror>
</error>
When using the normal preset (one class per entity) it works.