c# - Detect changes in ObjectSet in Entity Framework 4.0? -


i want check if there changes in table in ef 4.0 following code:

var = context.users.gethashcode();  addnewuser();  context.savechanges();  var b = context.users.gethashcode(); 

a == b, don't know why?

any helps appreciated!

gethashcode has absolutelly different usage. can't detect changes in objectset because entry point related database table(s). can detect changes prepared in objectcontext before accept changes (default savechanges accept changes). changes objectcontext use:

context.objectstatemanager.getobjectstateentries(...) 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -