Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffolding doesn't handle entities with kebab-cased names #52

Open
davidMuir opened this issue Apr 7, 2017 · 0 comments
Open

Scaffolding doesn't handle entities with kebab-cased names #52

davidMuir opened this issue Apr 7, 2017 · 0 comments

Comments

@davidMuir
Copy link

I'm consuming an OData API where the provider has the following entity as an example, with the namespace changed slightly to hide the providers name.

<EntitySet Name="subject-sets" EntityType="Service.Domain.Models.Projections.SubjectSet">
    <NavigationPropertyBinding Path="Tutor1" Target="staff" />
    <NavigationPropertyBinding Path="Tutor2" Target="staff" />
    <NavigationPropertyBinding Path="Tutor3" Target="staff" />
    <NavigationPropertyBinding Path="Pupil" Target="pupils" />
</EntitySet>

This is scaffolded by the OData Connected Service Extension to the following

[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "2.4.0")]
[global::Microsoft.OData.Client.OriginalNameAttribute("subject-sets")]
public global::Microsoft.OData.Client.DataServiceQuery<global::Service.Domain.Models.Projections.SubjectSet> Subject-sets
{
    get
    {
        if ((this._Subject-sets == null))
        {
            this._Subject-sets = base.CreateQuery<global::Service.Domain.Models.Projections.SubjectSet>("subject-sets");
         }
         return this._Subject-sets;
    }
}

which causes issues.

This should instead be converted to either camel_cased or PascalCased

@davidMuir davidMuir changed the title Scaffolding doesn't handle entities with snake-cased names Scaffolding doesn't handle entities with kebab-cased names Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant