In This Chapter
Defining LINQ query and update issues for SQL Server
Performing database interaction and modification
Handling concurrency issues
SQL Server is a complex database product, and two chapters can't discuss the product completely. In fact, most database developers probably have a shelf full of books precisely because a single book can't discuss the topic completely. This chapter discusses some specific advanced LINQ to SQL Server topics. The goal for this chapter is to end up with an application that can perform some level of modification to a database using LINQ queries as the source of the modification data.
You can probably skip this chapter if you plan to use LINQ only as a means for querying SQL Server (as described in Chapter 8). This book views querying SQL Server as a separate task from interacting with the data in SQL Server. This chapter considers interactions in the following three categories:
To accomplish the data modification goal, you must consider the framework in which the application makes the modifications. Balancing record safety, which often slows the application down to unusable speeds, with application performance, which can sacrifice reliability factors such as record safety, is important. Fortunately, LINQ helps you achieve these seemingly incompatible goals by providing a level of automated concurrency resolution and by helping you optimize the manner in which those checks occur.