unexpected GetType() result for entity entry

前端 未结 3 1062
孤独总比滥情好
孤独总比滥情好 2020-12-05 06:41

While I iterating through ObjectStateEntries I expected [t] variable name will be MY_ENTITY

foreach (ObjectStateEntry          


        
3条回答
  •  感情败类
    2020-12-05 07:28

    Another way is to access the BaseType property of the returned proxy type:

    Type t = entry.Entity.GetType().BaseType;
    

提交回复
热议问题