Sometimes, it is necessary to override standard CRUD-operations in LINQ. The overridden operations can be useful when you want to:
Entity Developer provides you the following approaches to implement this:
In this article we consider an implementation of CRUD operation overriding, based on the stored procedures. For example, we have custom delete logic implemented in “Company_Delete” stored procedure. This method contains specific rules of cascade deleting considered “PersonContact” table and some validation rules for deals between contact persons.
The procedure below is based on the model generated from our standard CRM_DEMO database.
To overload standard CRUD operations we have to perform the following steps:
1. Go to the Database Explorer, find “COMPANY_DELETE” stored procedure and drag-n-drop it to the diagram.

2. The “Company_Delete” method will be added to the corresponding Model Explorer node.

3. Right-click the Company class and choose Stored Procedure Mapping option.
4. Choose Delete in the Behavior dropdown list and choose COMPANYDELETE method in the Method dropdown list.

Also, you can add a stored procedure to the model when generating the model from the database. Just choose required objects on the Choose Database Objects page and then repeat steps 3 and 4.