Entity Framework - refresh objects from database

前端 未结 3 909
北荒
北荒 2021-02-14 09:53

I\'m having trouble with refreshing objects in my database. I have an two PC\'s and two applications.

On the first PC, there\'s an application which communicates with my

3条回答
  •  耶瑟儿~
    2021-02-14 10:29

    Another possibility is to use MergeOption to decide how you want to manage the objects in the context. For example MergeOption.OverwriteChanges will overwrite the object context with values from the data source.

    For more info see http://msdn.microsoft.com/en-us/library/system.data.objects.mergeoption.aspx

提交回复
热议问题