How can we improve WCF Data Services?

Multiple namespaces per service

Currently, when using the Entity Framework Provider (both for EF5 and EF6), all the types of all DbSet properties of the container/context class are placed in the same CSDL schema in the EDMX metadata of the OData service.

Since a CSDL schema necessarily exports elements to a single CSDL namespace, this means all the elements will be put in the same CSDL namespace (defined as the .NET/CLR namespace of the container/context class).

The problem is that the name of these elements may be derived from .NET/CLR symbols (e.g. EntityType elements use .NET/CLR type/class names) which could be defined in different .NET/CLR namespaces. This results in potential naming clashes, for which WCF Data Services throws exceptions.

Thus, I suggest having the ability to assign different namespaces to various elements, so that they can all be used as part of the same service. An obvious solution for EntityType elements is to use the .NET/CLR namespace of their corresponding .NET/CLR type/class for their CSDL namespace (instead of that of the Entity Framework context/container).

1 vote
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
tne shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base