Last post Sep 01, 2016 10:25 AM by Mukesh_Kumar
Sep 01, 2016 09:43 AM|sudip_inn|LINK
public List<Car> Get()
var cars = _context.Cars
.Include(car => car.Coordinates)
.Include(car => car.Client)
tell me what the above code will return ? what will stored in var cars ?
does it return data for car,Coordinates and Client table with relation ?
code taken from
Sep 01, 2016 10:03 AM|Wenushka|LINK
This will include / load car properties + all the coordinates of the car and the client of the car, if the db is created with correct relations.
So every loaded car will have its properties + it's all coordinates collection filled + it's client
You could have further look how loading the related data from following standard tutorial,
Thanks & Regards,
Sep 01, 2016 10:25 AM|Mukesh_Kumar|LINK
what will return from this EF query
To know about the result of this query you just need to actual use of include statement. Just visit this question on
stackoverflow for satisfactory answer and also
Hope this will help you.