EntityFramework show entities before saving changes

后端 未结 2 428
甜味超标
甜味超标 2020-12-20 14:48

Entity Framework ObjectSet with its method ToList shows just saved entities. That means, when I call

context.AddToCustomers(myNewCust);

and

2条回答
  •  礼貌的吻别
    2020-12-20 15:34

    Look at the TryGetObjectStateEntry(EntityKey, ObjectStateEntry) method

    http://msdn.microsoft.com/en-us/library/system.data.objects.objectstatemanager.aspx

提交回复
热议问题