From the course: .NET Essentials: LINQ for Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Queryable types: DbSet and DbQuery

Queryable types: DbSet and DbQuery - .NET Tutorial

From the course: .NET Essentials: LINQ for Databases

Start my 1-month free trial

Queryable types: DbSet and DbQuery

- [Instructor] I'm in Visual Studio and I'm looking at this class diagram. I thought I'd spend a minute talking about two classes that we use a lot in entity framework. That's the DB set of T and that DB query of T. You notice that DB set to rise from DB query and both of these types implement Iqueryable and I queryable of T. I recall from the slides that Iqueryable is where we store the expression tree and the query provider. And what do we have, as far as properties go in these two types? Let's start by looking at DB query. One of the properties of interest here is the SQL property. This contains a raw sequel that was generated by the query provider and sent to the database. Over in the DB set we have methods for modifying the contents of the DB set. See, we have add and add range and we have remove and remove range. We also have one called find, which is used for quickly finding items by primary key. And I'll talk…

Contents