Changing Entity State
Posted: Mon 17 Aug 2015 19:03
I'm working on some .Net Web Api web services with an Entity Developer generated DataContext (PostgreSQL). The standard practice on a Put seems to be to change the EntityState of the incoming object and SaveChanges.
https://msdn.microsoft.com/en-us/data/j ... 2147217396
I'm getting an error with the following line of code that there is no definition for Entry.
Here is the complete error message:
Error 1 'PieceCounter.Data.PieceCounterDataContext' does not contain a definition for 'Entry' and no extension method 'Entry' accepting a first argument of type 'PieceCounter.Data.PieceCounterDataContext' could be found (are you missing a using directive or an assembly reference?)
Thanks,
Craig
https://msdn.microsoft.com/en-us/data/j ... 2147217396
I'm getting an error with the following line of code that there is no definition for Entry.
Code: Select all
db.Entry(job).State = EntityState.Modified;
Error 1 'PieceCounter.Data.PieceCounterDataContext' does not contain a definition for 'Entry' and no extension method 'Entry' accepting a first argument of type 'PieceCounter.Data.PieceCounterDataContext' could be found (are you missing a using directive or an assembly reference?)
Thanks,
Craig