To perform CRUD operations with LINQ to SQL, you need to define a ___________.
- DataContext
- SqlConnection
- SqlCommand
- DataAdapter
The correct option is 'DataContext'. In LINQ to SQL, the DataContext class is responsible for connecting to the database and managing the objects retrieved from it. It acts as a bridge between the database and the .NET objects, allowing you to perform Create, Read, Update, and Delete (CRUD) operations on the database using LINQ queries and methods.
Loading...
Related Quiz
- The let keyword in LINQ is used to define ___________ that can be reused within the query.
- In ADO.NET, how do you access child rows related to a parent row in a hierarchical dataset?
- How can you configure the size of the connection pool in ADO.NET?
- In LINQ to SQL, the SubmitChanges method is used to _______ changes to the database.
- What is two-way data binding, and how does it differ from one-way data binding?