O'Reilly logo

Pro LINQ: Language Integrated Query in C# 2008 by Joseph C. Rattz Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

LINQ to SQL Database Operations

In this chapter, I will discuss and demonstrate how all of the typical database operations are performed with LINQ to SQL. Specifically, I will cover how to perform

  • Inserts

  • Queries

  • Updates

  • Deletes

After I discuss the standard database operations, I will demonstrate how you can override the default insert, update, and delete methods an entity class uses to persist changes to the database.

The last topic I will cover is the automatic translation of LINQ to SQL queries, including what to be mindful of when writing queries.

In order to discuss the standard database operations, I will have to refer to the DataContext and relevant entity classes. I am aware that I have not provided much detail yet as to how entity classes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required