Skip to content

Metadata documents with multiple schemas #9

@bbowyersmyth

Description

@bbowyersmyth

Porting some code from Simple.OData.Client and can't find how to retrieve types that are not in the first schema.

		var baseUrl = "https://services.odata.org/V4/Northwind/Northwind.svc";

		using var client = new ODataClient(new ODataClientOptions
		{ 
			BaseUrl = baseUrl
		});

		var metadata = await client.GetMetadataAsync(cancellationToken: CancellationToken);

		// None found
		var products1 = metadata.EntitySets.FirstOrDefault(et => et.Name == "Products");
		var products2 = metadata.EntityTypes.FirstOrDefault(et => et.Name == "Products");

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