You are previewing Essential LINQ.

Essential LINQ

Cover of Essential LINQ by Charlie Calvert... Published by Addison-Wesley Professional

Chapter 10. Using Stored Procedures and Database Functions with LINQ to SQL

LINQ to SQL generates dynamic SQL for queries and inserts, updates, and deletes. However, in some cases data access must be made through stored procedures, also called sprocs. Stored procedures may encapsulate business logic, ensure security restrictions, or provide an optimized and restricted way to query or modify data. Occasionally a database may be accessible exclusively through stored procedures. Hence, LINQ to SQL fully supports stored procedures for CRUD operations. This chapter looks at how to specify the stored procedures and database functions for mapping and how to use them to perform CRUD operations.

Stored Procedures and Functions for Querying

Let’s begin ...

The best content for your career. Discover unlimited learning on demand for around $1/day.