I have a repository for a MVC 4 Web API to retrieve data from database using Linq to SQL Method Syntax. The code I have so far (its not much) for the a utility:
public IQueryable<Vehicle> Vehicles(int driverId_Vehicles)
{
...?...
}
I've put together an SQL query that would get the data from the database:
SELECT VEHICLE.*
FROM Vehicle
INNER JOIN DriverHabit
ON VEHICLE.Id=DriverHabit.VehicleId
WHERE DriverHabit.Id = driverId
I need assistance translating this query into the LINQ method syntax to return the IQueryable.