1

Closed

Do not allow duplicate function names for the same entity type

description

In the following scenario, i have duplicate function names for the entity type Product...the services opens successfully and shows both these functions and also the advertisement shows both these functions...we should throw error before opening the service...

static IEdmModel GetImplicitEdmModel()
    {
        ODataConventionModelBuilder modelBuilder = new ODataConventionModelBuilder();
        var products = modelBuilder.EntitySet<Product>("Products");
        var productFamilies = modelBuilder.EntitySet<ProductFamily>("ProductFamilies");
        var suppliers = modelBuilder.EntitySet<Supplier>("Suppliers");

        var config = products.EntityType.Action("ExtendSupportDate");
        config.Parameter<DateTime>("newDate");
        config.ReturnsFromEntitySet<Product>("Products");

        var config2 = products.EntityType.Action("ExtendSupportDate");
        config2.Parameter<DateTime>("newDate");
        config2.ReturnsFromEntitySet<Product>("Products");
Closed Apr 1 at 9:39 PM by HongmeiG
I think this is a pretty rare user error, and I would rather wait for user data for this.

comments

HongmeiG wrote Oct 10, 2012 at 8:48 PM

This is a rare error case and we can verify post build.