Dave Mackey
Dave Mackey

Reputation: 4432

Get Specific Value from entity.OriginalValues in EFv4

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

Upvotes: 1

Views: 185

Answers (1)

Yury Tarabanko
Yury Tarabanko

Reputation: 45121

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

entry.CurrentValues.Item[propName];

or

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

Upvotes: 2

Related Questions