public IQueryable<CarVersion> GetCar(int carIdToSearch)
{
return _Dbcontext.CarVersion.Include("CarFactory").
.Where(x => x.carId== carIdToSearch);
}
I have CarVersion
table, which has two columns version and carId. Version column is primary key. There can be multiple version for single carId. CarFactory
table has foreign key version from carVersion table. So I'm trying to understand, when I execute above query will it always give me results which are ordered in ascending order. Or will it be based on primary key? Or it can be guaranteed? I looked at MS documentation but it does not say anything about ordering.