Changing Entity State

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Posts: 4
Joined: Wed 05 Aug 2015 21:43

Changing Entity State

Post by cvboucher » 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. ... 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;
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?)


Site Admin
Posts: 8248
Joined: Thu 14 Aug 2008 12:44

Re: Changing Entity State

Post by Shalex » Tue 18 Aug 2015 10:15

Please refer to ... sion-metho. You can check your current active template via Tools > Entity Developer > Model Explorer.

Post Reply