I have two distinct databases as a source for a Silverlight RIA application. They are exposed through separate RIA services.
There is one relationship between the databases, meaning that I have a foreign key (no constraint) between the databases. My Entities currently load this as an Int32. How would I go about mapping this to an actual end-user display value from the other database?
It appears that Value Converters require synchronous operations. Also, any asynchronous call in the DomainDataSource.LoadedData
will cause the data source to remain busy indefinitely.
You could also consider using the ExternalReference attribute.
For example,
public partial class SalesOrderHeader
{
[ExternalReference]
[Association("My_Custom_FK", "CustomerID", "CustomerID")]
public Customer Customer { get; set; }
}
In this way you could build a connection between your RIA domain contexts. An example that helps towards making this work is Nikhil's BookClub solution where he projects domain entity types into objects he returns to his view models.
You could do the same except you would be bridging the gap between domain contexts.