It is known that ADO.NET Data Services also allows changing
data. For this purpose the data model should have IUpdatable interface. By
means of this interface, data is updating. The LINQ to SQL data model does not
have this interface. This is a matter of a problem.

The reasons of it consist that LINQ-to-SQL platform was
released much earlier than ADO.NET Data Services. As IUpdatable interface is
part of ADO.NET Data Services, it was impossible to implement it in LINQ to SQL
model. To solve this problem, implement IUpdatable as an interface.

Interface IUpdatable should be implemented in a data
context. For these purposes it is possible to create a partial class and to
implement the interface there. We choose a data context; click the right button
of the mouse and choose "View code" item.

Figure 5: Creation of a partial class

After creating a class and setting IUpdatable interface as
base it is possible to receive a stub code as shown in Listing 2.

We can see that IUpdatable interface consists of resource
getting methods, resource creation and resource deletion. It also contains
methods for getting and setting value of a field, creation and deletion of
references and saving changes. Apparently this interface is simple and laconic
enough. We can implement the given interface once and use it for various
models, without dependence on what data is used there.