Linked Questions

0 votes
1 answer
1k views

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 ...
TheDudeDude's user avatar
0 votes
1 answer
139 views

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 ...
Graham's user avatar
  • 1,527
2 votes
0 answers
104 views

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....
andrey.shedko's user avatar
0 votes
1 answer
69 views

I have three Entity classes. public partial class Person { public Person() { this.Locations = new HashSet<Location>(); } public int PersonID { get; set; } ...
Iman's user avatar
  • 869
0 votes
0 answers
37 views

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;...
Acorn's user avatar
  • 1,197
-1 votes
1 answer
34 views

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 ...
it-person's user avatar
  • 118
179 votes
4 answers
171k views

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 { ...
Brendan Vogt's user avatar
  • 26.1k
7 votes
3 answers
19k views

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 ...
Nawed Nabi Zada's user avatar
10 votes
2 answers
18k views

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; } } ...
Marvin Püthe's user avatar
3 votes
1 answer
6k views

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 ... } ...
eat chocolate's user avatar
7 votes
3 answers
1k views

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....
first last's user avatar
0 votes
1 answer
2k views

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 ...
Michiel's user avatar
  • 113
1 vote
2 answers
2k views

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, ...
Muhamad Jafarnejad's user avatar
4 votes
2 answers
3k views

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 ...
Kadir's user avatar
  • 3,224
0 votes
1 answer
2k views

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;...
Lion's user avatar
  • 18.1k

15 30 50 per page