Answer the question
In order to leave comments, you need to log in
Why is EF core not receiving data?
Here are the models:
[Table("Accounts")]
public class Account
{
[Key]
public int Id { get; set; }
public string Name { get; set; }
public string Login { get; set; }
public List<Element> Elements { get; set; }
}
[Table("Elements")]
public class Element
{
[Key]
public int Id { get; set; }
public int AccountId { get; set; }
public Account Account { get; set; }
public string Name { get; set; }
}
var testAcc = dba.Data.Where(a => a.Login == "Test").Include(a => a.Elements).ToList().First();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question