Multiple Include/ThenInclude causing duplicates in EF Core

.net-core entity-framework entity-framework-core sql-server

Popular Answer

var data = _dbcontext.Person
    .Where(p => p.BuildingId == buildingId)
    .Include(p => p.Building)
    .Include(p => p.Doctor)
    .Include(p => p.Teacher)
    .Include(p => p.Farmer)
    .Include(p => p.Prostitute)
    .OrderBy(p => p.Building;
0
6/18/2018 9:46:28 PM






Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow