I have two tables, group and person. These are created in Sqlite using EntityFramework and therefore the i have two classes like this:
public class Group { public int Id { get; set; } public string Name { get; set; } }
public class Group { public int Id { get; set; } public string Name { get; set; } }
public class Person { public int Id { get; set; } public string Name { get; set; } public ICollection<Group> Group{ get; set; } }
public class Person { public int Id { get; set; } public string Name { get; set; } public ICollection<Group> Group{ get; set; } }
From what i understand the line: "public ICollection<Group> Group{ get; set; }" creates a relation between the two tables(the id) when created by EF.
So to my question - when i try to retrieve Person via API(postman) i only get Id and Name. The goal is to get The person object but with Group nested in the JSON response.