Hi.
i've got a database with a table named PropertyValues where i store every value i need to describe some properties of my database table rows.
For example, table Products which looks like this :
ID
OrderID //Products table is related with Order table
ProductName
ProductType_ID // ID of PropertyValues table which describes product type (food, parfume, chemicals)
ProductCountry_ID // ID of PropertyValues table which links to country where product came from ProductStatusID //also ID of PropertyValues table which contains product status(availible, not availible)
with such database model, to get order and all it's products with their type, country and status i'll have to write something like this :
var orders = from o in dbEntities.Order.Include("Products.ProductType")
.Include("Products.ProductCountry")
.Include("Products.ProductStatus")
select o;
and the question is :)
can it be done automatically ( so all related entities will be included )
or maybe there is better approach ?
Thank You !