I want to make "Common.Student" and "xyzProp" dynamic(replaced programmatically),
I have them as string right now how to handle Type
var builder = new ODataConventionModelBuilder();
var entity = builder.EntityType
entity.Ignore(x => x.xyzProp);
I want to make "Common.Student" and "xyzProp" dynamic(replaced programmatically),
I have them as string right now how to handle Type
var builder = new ODataConventionModelBuilder();
var entity = builder.EntityType
entity.Ignore(x => x.xyzProp);
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ketan KoltePosted Apr 4, 2024, 4:32 PM
in your code Common.Student seems to be EntityTpye , but i currently have it as a String "Common.Student" need to convert it to Tpye at runtime.
Jayraj ChhayaPosted Apr 3, 2024, 12:58 PM
To dynamically ignore properties at runtime in .NET EF Core and OData, you can achieve this by using reflection to access the entity type and ignore the specified property.