Linked Questions
41 questions linked to/from Entity Framework - Include Multiple Levels of Properties
0
votes
1
answer
1k
views
How to select entire parent/child tree of entities in EF? [duplicate]
In our database we have a large "god" table that has several parent/child relationships with other tables (PK/FK)...and those tables have several parent/child relationships with other tables....and so ...
0
votes
1
answer
139
views
Loading Related Entities in a Repository using EntityFramework [duplicate]
In my model, I have a User aggregate root, each of which has a collection of associated Transactions. Each Transaction has a reverse navigation property User.
I need to get all of the Transactions ...
2
votes
0
answers
104
views
LINQ. How to use .Include for query entities with no direct connection [duplicate]
I'm trying to include in one LINQ query few entities. Entity UserPrograms > Entity Training Program > Entity SetDetails by this query
return await _db.UserPrograms.Include(x => x....
0
votes
1
answer
69
views
Entity Framework trouble querying ManyToMany relationship [duplicate]
I have three Entity classes.
public partial class Person
{
public Person()
{
this.Locations = new HashSet<Location>();
}
public int PersonID { get; set; }
...
0
votes
0
answers
37
views
Entity Framework get all models for a list of models [duplicate]
I have three models: Quiz, Question, and Answer.
public class Quiz
{
public int ID { get; set; }
public string Title { get; set; }
public ICollection<Question>? Questions { get; set;...
-1
votes
1
answer
34
views
Load the referenced table of a referenced table [duplicate]
I have multiple tables that refer to other tables in my database.
I can select the entries of one table and the refered entries. In the refered table is also a table refered.
How can I load all ...
179
votes
4
answers
171k
views
How to include a child object's child object in Entity Framework 5
I am using Entity Framework 5 code first and ASP.NET MVC 3.
I am struggling to get a child object's child object to populate. Below are my classes..
Application class;
public class Application
{
...
7
votes
3
answers
19k
views
Entity Framework - Include multiple level properties
I am trying to get a table from database using entity framework.
The table has reference to other table which again has reference to other tables.
I know how to include other tables. And according to ...
10
votes
2
answers
18k
views
ThenInclude not working for an Entity Framework LINQ query [duplicate]
I have a database model like this:
public class Customer
{
public int CustomerId{ get; set; }
public int OrderId { get; set; }
public ICollection<Order> Orders { get; set; }
}
...
3
votes
1
answer
6k
views
Entity Framework Core - Include Multiple Levels of a Property for a Collection [duplicate]
I want to know how I can include multiple levels of a property for a collection in Entity Framework Core.
An example of my situation:
public class A
{
public ICollection<B> listB ...
}
...
7
votes
3
answers
1k
views
Behaviour when including the same field twice in entity framework linq
what happens when I include the same field twice, meaningly I take from db an entity and I use the EF .include option. What I mean is this:
I have:
.Include(x => x.Student)
.Include(x => x....
0
votes
1
answer
2k
views
include multiple objects inside an object [Entity framework]
I'm trying to retrieve both the list of ProjectCategories (subcategories) and the Categorie of a ProjectCategorie, the sub lists are retrieved. But I have no idea how to get the Categorie.
Project ...
1
vote
2
answers
2k
views
Query many to many relation with lambda expression
I'm using entity framework database first.
For one to many relation, in sql server, I use the following sql query(Status_ID is foreign key):
SELECT Products.*, Status.Title as Pstatus
FROM Products, ...
4
votes
2
answers
3k
views
How to filter child collection with linq dynamic
I'm trying to filter results for user request.
For instance you have orders and order details and products is child collection.
When user wants to filter by product I'm getting an error because of ...
0
votes
1
answer
2k
views
Include Entity of generic list property in ASP.NET EntityFramework Core
I have a many-to-many relation between parents and childs using a relation table cause those relations are not automatically supported in EF Core yet:
class Parent{
[Key]
public int Id{get;...