OData registers generic type definition/parameter as EDM types
Open
@gathogojr is already working on this.
Since May 9, 2023.
followup
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
When there's a generic EDM type that is derived from other type:
namespace Model
{
public class BaseType { }
public class GenericType<T> : BaseType
{
public T Data { get; set; }
}
}
and if both are registered as complex types, basically:
modelBuilder.AddComplexType<BaseType>();
modelBuilder.AddComplexType<GenericType<string>>();
var model = modelBuilder.GetEdmModel();
then OData also registers generic type definition/parameter when it's building the model, so as result EDM metadata contain the following:
<ComplexType Name="GenericType_1OfT" BaseType="Model.BaseType">
<Property Name="Data" Type="Model.T"/>
</ComplexType>
<ComplexType Name="T"/>
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.