Unable to find property CurrentValues on EntityEntry object that returned by DbContext.Entry method

c# entity-framework entity-framework-core

Question

For one who miss question tags - it is all about EntityFramework 7 (beta8)

Main question is in subject.

Btw, all I need is shortcut method that allows me to set entity properties using another entity of same type (just like in example code below):

dbContext.Entry(someAttachedEntity)
    .CurrentValues
    .SetValues(someSrcObject);

It seems like my problem is connected with return value type of DbContext.Entry<T> method: in EF6 it was DbEntityEntry<T>, but in EF7 it is EntityEntry<T> (more abstract object?).

So, is it some breaking change or I just miss some dependency?

Accepted Answer

From aspnet/EntityFramework#1999;

we do not have anything like this planned for EF7 RTM but it sounds like something we would consider adding in the future.



Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why