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 - .NET Tutorial
From the course: .NET Essentials: LINQ for Databases
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
-
-
-
-
-
Explore the relevant LINQ types4m 24s
-
(Locked)
Understand the DbContext2m 38s
-
(Locked)
Queryable types: DbSet and DbQuery1m 30s
-
(Locked)
DbSet, the basis for EF collection models1m 57s
-
(Locked)
Save changes in DbSet3m 1s
-
(Locked)
DbQuery, the basis of LINQ queries for EF models1m 4s
-
(Locked)
Interfaces: IEnumerable and IQueryable1m 41s
-
(Locked)
View the Expression Tree1m 20s
-
(Locked)
View the generated SQL1m 25s
-
-
-
-