Closed dweeden closed 2 years ago
Specifically I'm trying to register the entity sets like this:
modelBuilder.EntitySet<Object>("Meta");
modelBuilder.EntitySet<Field>("Meta");
And then service them within my MetaController with this method
[EnableQuery]
public IActionResult Get(string name)
{
if (name == "objects")
{
return Ok(_context.Objects);
}
else if (name == "fields")
{
return Ok(_context.Fields);
}
return NotFound();
}
it seems you are looking for this: https://github.com/OData/AspNetCoreOData/tree/main/sample/ODataDynamicModel
Let me know if it's no or file new issue. thanks.
Wanting to do something very similar to this but running into the same errors.
https://stackoverflow.com/questions/57616954/how-do-i-bind-multiple-entity-sets-to-one-odata-controller
Is there a way to do this with the current Microsoft.AspNetCore.OData 8.02?