I am working in an asp.net MVC 4 application and I am using Entity framework 6 in my application. I am using both code first approach for new tables/entities as well as database first approach with model designer(edmx). Customers are in codefirst model with separate context where as vehicles are in edmx. both have different context object. I want to use a query like this:
return View(maindb.Reservations.Include("customer").Include("Vehicle"));
but it returns error:
A specified Include path is not valid. The EntityType 'myproject.Data.Reservation' does not declare a navigation property with the name 'Vehicle'.
Please suggest how to fix it so that I can get properties of Vehicle and use them in my view.