i created a db-model with the entity framework wizzard in Visual Studio. There are 2 tables (job, stocktype) which are related to each other with the table stocktype2job.

Job <------- no direct relation / navigation property --------> StockType
| |
| |
---------------------> StockType2Job ----------------------------->
With a Job Object, i could do something like this ...
EntitiesObject db = new EntitiesObject();
Job job = db.Jobs.SingleOrDefault(j => j.IdJob == 40);
List<StockType> stockTypes = new List<StockType>;
foreach (StockType2Job st2j in job.StockType2Jobs)
{
stockTypes.add(st2j.StockType);
}
That should work just fine. But is there a way to create a navigation property in the job entity so i can write something like this?
EntitiesObject db = new EntitiesObject();
Job job = db.Jobs.SingleOrDefault(j => j.IdJob == 40);
List<StockType> stockTypes = job.StockTypes; // <<-----
Thanks for your kind Help Apo