views:

200

answers:

1

If I have a Linq table of say User and I then do something like this;

public partial class DataAccessDataContext
{
    partial void UpdateUser(User instance)
    {
        //do something here
    }
}

What ends up happening is that the record is never updated in the database.

As soon as I get rid of the UpdateUser method the database is again updated.

I found something on the web that mentions that as soon as you implement any of the three extensibility methods of Insert, Update and Delete, then the database is no longer updated.

Is this correct and is there a way I can get this to work?

+2  A: 

You need to call the Dynamic update method like;

this.ExecuteDynamicUpdate(instance);