none
ChangeTracker State set implicitly to Modified RRS feed

  • Question

  • I have a WPF application where is a list of self-tracking entities on the client side is bound to a listbox...

    For some reasons most of the entity's ObjectState (which BTW passed from a WCF service) are being set to Modified state even though none of them have been touched.

    I've been treading water for last couple of days trying to figure out what the issue is but could not come up with anything.

    If someone dealt with this problem before, could you please share you thoughts here?

    Thanks!

    Tuesday, November 15, 2011 10:30 PM

Answers

  • Hi robohelt,

    Welcome!

    Have you called  MarkAsModified method on you client or change the tracked entities' properties?

    -----------------------------------------------------------------

    Make sure that your client project has a reference to the assembly containing the entity types. If you add only the service reference to the client project, the client project will use the WCF proxy types and not the actual self-tracking entity types. This means that you will not get the automated notification features that manage the tracking of the entities on the client.

    -----------------------------------------------------------------

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, November 16, 2011 9:07 AM
    Moderator

All replies

  • Hi robohelt,

    Welcome!

    Have you called  MarkAsModified method on you client or change the tracked entities' properties?

    -----------------------------------------------------------------

    Make sure that your client project has a reference to the assembly containing the entity types. If you add only the service reference to the client project, the client project will use the WCF proxy types and not the actual self-tracking entity types. This means that you will not get the automated notification features that manage the tracking of the entities on the client.

    -----------------------------------------------------------------

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, November 16, 2011 9:07 AM
    Moderator
  • Hi,

    I am writing to check the status of the issue on your side.  Would you mind letting us know the result of the suggestions?

    If you need further assistance, please feel free to let me know.   I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, November 21, 2011 6:51 AM
    Moderator