Skip to content

Customise generated OData NAV.cs to look look up more specific Manifest file #430

@xuzhg

Description

@xuzhg

Stackoverflow: https://stackoverflow.com/questions/79595672/customise-generated-odata-nav-cs-to-look-look-up-more-specific-manifest-file

Goal

Have multiple generated OData models in the same project.

Problem

When I generate the files using dotnet odata-cli generate, the NAV.cs contains code that looks for a single file by OData ServiceCsdl.xml (see below). The issue with multiple generated OData models is that I have multiple of these XML files embedded in the project, so it throws an exception

global::System.Linq.Enumerable.Single(assembly.GetManifestResourceNames(), str => str.EndsWith(filePath));

I looked at the options of the CLI tool and didn't see anything relevant

https://learn.microsoft.com/en-us/odata/odatacli/getting-started

Is there a way around this? e.g. Give it a more specific path

Workaround

Use multiple projects, which is annoying for our circumstances, but will use it if have to

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions