How to know whether a property stored in DbEntityEntry is a property`?

c# entity-framework entity-framework-6

Question

Within an Entity Framework 6DbEntityEntry Calling a number will allow you to get particular informationProperty . But this falls short due of anArgumentException when the object is a collection or reference rather than a physical object. Then, more functions are required.

How do I determine which function to use? In other words, how can I tell if a property is a basic property, complicated property, reference, or collection?

See https://msdn.microsoft.com/en-us/library/system.data.entity.infrastructure.dbentityentry%28v=vs.113%29.aspx for DbEntityEntry.

Entity Framework 6.1.3 is what I'm using in Visual Studio 2013.

1
2
5/8/2015 4:24:26 AM

Accepted Answer

Zzz-3-Zzz gives anDbMemberEntry that you can verify using(memberEntry is DbPropertyEntry) .

2
5/14/2015 12:31:58 AM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow