Hi,
I have been having problems figuring out the best way to display referenced data within Composite c1. Here is the scenario.....
I have a data type called Candidate. This data type has various fields and some fields that are references to other datatypes in this case I have a list of Industries and also a list of Countries.
using (var dataConnection = new DataConnection())
{
candidate = dataConnection.Get<JobAdder.ConnectedCube.Candidate>().Where(x => x.Reference == reference).FirstOrDefault();
}
I don't have a problem getting the candidate object but its time consuming getting each referenced data (Industry, Country) - I think I am doing it the long way around - I simply use the guid that is stored and do another data lookup (alot of code which I am hoping is unnecessary)
The problem is that the following code will just display the GUID of the Industry and Country reference. What is the best way to display the data here. I just assumed you would be able to do something like this @candidate.Industry.Name but it doesn't look like this is the case.
#<div class="table-content-row">
# <div class="float-left column1">
# <strong>Industry:</strong> @candidate.Industry
# </div>
# <div class="float-left column2">
# <strong>Country:</strong> @candidate.Country
# </div>
#</div>
Thanks
David
Comments: Answered. Discussion forum is a more preferable place for questions.
I have been having problems figuring out the best way to display referenced data within Composite c1. Here is the scenario.....
I have a data type called Candidate. This data type has various fields and some fields that are references to other datatypes in this case I have a list of Industries and also a list of Countries.
using (var dataConnection = new DataConnection())
{
candidate = dataConnection.Get<JobAdder.ConnectedCube.Candidate>().Where(x => x.Reference == reference).FirstOrDefault();
}
I don't have a problem getting the candidate object but its time consuming getting each referenced data (Industry, Country) - I think I am doing it the long way around - I simply use the guid that is stored and do another data lookup (alot of code which I am hoping is unnecessary)
The problem is that the following code will just display the GUID of the Industry and Country reference. What is the best way to display the data here. I just assumed you would be able to do something like this @candidate.Industry.Name but it doesn't look like this is the case.
#<div class="table-content-row">
# <div class="float-left column1">
# <strong>Industry:</strong> @candidate.Industry
# </div>
# <div class="float-left column2">
# <strong>Country:</strong> @candidate.Country
# </div>
#</div>
Thanks
David
Comments: Answered. Discussion forum is a more preferable place for questions.