I have entity instance(north)
NorthdatabaseEntity north = new NorthdatabaseEntity()
The problem is that i don’t have access to ObjectContext methods. I tried to call them with object “north” but i didn’t found the method “AddObject” or any other from ObjectContext.
I thought that any entity object has all methods from ObjectContext class.
Where is the problem here?
ObjectContext and entities are different objects; you may use
ObjectContextto add/modify/delete objects, but entities does not have direct access toObjectContext.You need to create an instance of
ObjectContextand perform your operations on itself, not on entities.