I have a queryable linq to entities ) in the EntityFramework and I am not able to pull data from two or more tables.
For example:
var model = _service.List().Where(m => m.DS_GRUPO.Contains(searchString)).Select(m => new { m.PK_GRUPO, m.DS_GRUPO, m.SUBGRUPO.DS_SUBGRUPO }).ToList();
Here I do a search and from the search result I select only the data that I will use, they are: the properties m.PK_GRUPO and m.DS_GRUPO are OK, both are of the string type since m.SUBGRUPO is an ICollection of the SubGroup class and I also need to get m.SUBGRUPO.DS_SUBGRUPO that I am not getting.
Does anyone know how I can get this other property?