Quantcast
Viewing all articles
Browse latest Browse all 18858

Entity Data Model. How to check data changes

hi,

is there a way to check if data in an Entity Data Model have been changed (ie: new items created, items removed or updated)? Working with DataSet I was able to write something like this:

    Dim MyDataSet As MyApp.myDataSet
....

   Public Sub Save()
      If MyDataSet.HasChanges Then
         MyDataSetMYTABLETableAdapter.Update(MyDataSet.MYTABLE)
      Else
         MsgBox("No data changed")
      End If
   End Sub

can I write something like this before running myDataContext.SaveChanges?

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>