ObjectStateManager couldn't recognize the object entry

122 views Asked by At

I have the following code..

else if (p.EntityKey != null)
                        {
                            db.ApplyPropertyChanges(p.EntityKey.EntitySetName, new TableName_Entity()

                            {
                                AccountName =Profile.UserName,
                                Mx = null,
                                Sx = null,
                                Lx = null,
                                LastUpdated = DateTime.UtcNow

                            });

For this piece I am getting error like "The ObjectStateManager does not contain an ObjectStateEntry with a reference to an object of type."

Tried bit of digging, but couldn't understand the exact reason. Adding further before it was working perfectly but later I have added LastUpdated column in the table thus started giving the above mentioned error.

0

There are 0 answers