views:

62

answers:

0

Hi,

WCF Data Services and Silverlight client BeginSaveChanges does not work with stored procedure as UpdateFunction of a View as entity in the entity model?

I have specified stored procedure as UpdateFunction in the entity model specified as update function of a view. From the Silverlight client I call WCF Data Service. I also have a MyDataServiceCollection created by LoadAsync call. All data is coming fine. The problem is when I try to update.

When I try to trace my code:

  1. var ent = MyDataServiceCollection.FirstOrDefault();
  2. MyDataServiceContext.BeginSaveChanges(SaveChangesOptions.Batch, OnChangesSaved, MyDataServiceContext);

the first line above 1. is just for me to trace the value for MyDataServiceCollection entity and the entity is modified and ok. Then I call my BeginSaveChanges method.

in the WCF service I have created change interceptor just to trace the values:

public void OnChangeMyView(MyView MyView, UpdateOperations operations)

here the value of the entity is old one and despite the stored procedure is called after this, obviously if the value is old the call is not good.

any help or working sample for WCF data service and stored procedure as UpdateFunction of a View as entity in the entity model is appreciated

thanks