开发者

Get Specific Value from entity.OriginalValues in EFv4

开发者 https://www.devze.com 2023-01-06 05:08 出处:网络
I have an ObjectStateEntry \"entry\". I need to get a property value from this \"entry\" like so开发者_如何学Go, but I don\'t know how to specify the property I want. I use entry.OriginalValues(propNa

I have an ObjectStateEntry "entry". I need to get a property value from this "entry" like so开发者_如何学Go, but I don't know how to specify the property I want. I use entry.OriginalValues(propName) but then what?


As far as I understand you can try something like this:

entry.CurrentValues.Item[propName];

or

entry.CurrentValues.GetValue(entry.CurrentValues.GetOrdinal(propName))
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号