Get underlying entity object from entity framework proxy

While working with EF 6 i used the following code to get the underlying POCO entity type from proxy type,

var entityType = ObjectContext.GetObjectType(dbEntitymodifiedEntry.Entity.GetType());

ObjectContext.GetObjectType : Return the POCO from proxy object

reference : https://learn.microsoft.com/en-us/ef/ef6/fundamentals/proxies

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)