Closed Alfetta159 closed 9 months ago
you probably have the Default Namespace used in your OData Model. if you change it in the metadata it will be reflected in the generated client, you can also override the namespace in the generator
@aboryczko , What are you referring to when you say, "OData Model"? There are many models used by the EF database context that I am using, but they are just exposed in the OData controllers each representing a DBSet in the EF DB context. Where would I be designating this, "Default Namespace" in the OData API?
@Alfetta159 by "OData Model" I mean the EDM that you specify to ASP.NET probably in your Startup
ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
builder.Namespace = "Your.Namespace";
builder.ContainerName = "CustomService";
instead of Default.Container you would get Your.Namespace.CustomService when generating a client from this model's metadata document
I cannot see how to place the generated
Container
class into a namespace other thanDefault
. This could be a problem if everyone using these generated objects can't differentiate between different instances of different types of this class. Bug, feature, or am I missing something? All other data objects are in a custom namespace, but the container is not.Container class:
Data object class: