Efficient way to query documents and media using relations
Developing a business directory.
Members can list multiple businesses and each business can have n media and 1 default media photo.
What's the most efficient to query Umbraco to get a list of Businesses and their default media to show in a list?
I am thinking that Umbraco relations might be the way to go but haven't got a clue how to use Linq to efficiently query Umbraco to get the list of businesses and their related media.
On the members' personal page I will need to display the businesses for that particular member together with their related media.
In other parts of the site (e.g., the business category pages) I'll need to display a list of the businesses by any member (again with their related media).
I think of it like a SQL left join I need to do between businesses and their related media. I know how to do it in SQL but not in Umbraco with relations.
It's the relational aspect of this task that is foxing me.
Efficient way to query documents and media using relations
Developing a business directory.
Members can list multiple businesses and each business can have n media and 1 default media photo.
What's the most efficient to query Umbraco to get a list of Businesses and their default media to show in a list?
I am thinking that Umbraco relations might be the way to go but haven't got a clue how to use Linq to efficiently query Umbraco to get the list of businesses and their related media.
Can anybody post some pseudocode?
Thanks in advance.
Are you trying to list the business by member or could you just query them by document type and return all of the businesses?
Hi Amir
Actually both.
On the members' personal page I will need to display the businesses for that particular member together with their related media.
In other parts of the site (e.g., the business category pages) I'll need to display a list of the businesses by any member (again with their related media).
I think of it like a SQL left join I need to do between businesses and their related media. I know how to do it in SQL but not in Umbraco with relations.
It's the relational aspect of this task that is foxing me.
Many thanks, Gordon
is working on a reply...