I am using InventSum and InventDim as the master tables in my DP class to get all the other field values, now I have to find that if a specific item has any attribute value or not, if item has attribute then it should show the value of the item. I have done this earlier in SQL but I am finding difficulty in joining my query with the master tables.
SQL query is as follows:
select TEXTVALUE,* from ecoResProductAttributeValue
join ecoResAttribute
on ecoResAttribute.RecId = ecoResProductAttributeValue.Attribute
join ecoResValue
on ecoResValue.RecId = ecoResProductAttributeValue.Value
where ecoResProductAttributeValue.Product = 68719556622
AND ecoResAttribute.Name = 'Item Type'
My code in DP class is as follows:
while select * from InventSum
join inventDim
where InventSum.InventDimId == inventDim.inventDimId
join inventLocation
where InventLocation.InventLocationId == inventDim.inventlocationid
&& (InventLocation.inventlocationId == ShopId || InventLocation.inventlocationId == 'All')
{
//all field values that i want to get are set here
}
I want this kind of result but against a specific item,

So product 68719556622 has atttribute attached with it of name item type and value A, I want to get same thing but with itemId and using the master table inventSum and InventDim in my DP class.