Skip to content

Expand Base property #2213

@eduardoxvii

Description

@eduardoxvii

I can't expand property in base class.

Assemblies affected
Microsoft.AspNetCore.OData 7.4.1

public class StreetAddress
{
public int Id { get; set; }
public string Street { get; set; }
public string City { get; set; }
}

public class Order
{
    public int Id { get; set; }
    public string Description { get; set; }
}

public abstract class Place
{
public int Id { get; set; }
public string Name { get; set; }
public StreetAddress ShippingAddress { get; set; }
}

public class School : Place
{
public Order Order { get; set; }
}

Reproduce steps
I made these requists:
http://localhost:5000/School?$expand=Order (Working)
http://localhost:5000/School?$select=Name (Working)
But
http://localhost:5000/School?$expand=ShippingAddress (Not Working)

Actual result

EF.Property called with wrong property name.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions