AspNetCoreOData
AspNetCoreOData copied to clipboard
ODataInstanceAnnotationContainer is not available in AspNetCoreOData
ODataInstanceAnnotationContainer
in OData\WebApi allows CLR types to add annotations by having a ODataInstanceAnnotationContainer InstanceAnnotations
property as seen here. This functionality was added in https://github.com/OData/WebApi/pull/2219 but never ported to AspNetCoreOData
. For example,
public class Address
{
public string Street { get; set; }
public string City { get; set; }
public ODataInstanceAnnotationContainer InstanceAnnotations { get; set; }
}
var address = new Address
{
Street = "foo",
InstanceAnnotations = new ODataInstanceAnnotationContainer()
}
address.InstanceAnnotations.AddResourceAnnotation("Foo", 2);
Is there an alternative option in AspNetCoreOData
or does the feature just need to be ported?
@giulianob I haven't fully ported this feature from 7 to 8 yet. I'd like to rethink the design in 7 and maybe need a better design.
@xuzhg is there already some architectural decision how to implement this? and if yes can the community (maybe I) contribute this feature? this is highly needed for my projects and I try to migrate them until end of year. (because dotnet 3.1 support ends)