Hi
I have the following code running AfterInsert of a DataSource control.
What I'm trying to achieve is set the value MasterShow_Pk equal to a value.
The code runs fine but the Data Store is not being updated with the value.
protected void _x_ShowsDataSource_AfterInserted(object sender, x.Web.Data.LinkedDataSourceEventArgs e)
{
x.Entities._x_Shows Show = (yBC.Entities._x_Shows)e.Entity;
Show.MasterShow_Pk = 123;
Show.EntityState = x.Entities.EntityState.Changed;
Show.AcceptChanges();
x.Data.DataRepository._x_ShowsProvider.Save(Show);
}
I used the line Show.EntityState = x.Entities.EntityState.Changed; as when stepping through the code i found the EntityState = Unchanged; so was thinking that was the problem. But still there is no update happeing in the DataStore with the inclusion of this line.
Help Needed
Thanks
Matt