Create Calculated Property in Persistent Class based on Relationship
Hi Dev Community,
I have a persistent Document class that has a FileName string property and another Question class that has an optional one-to-many relationship with Document.
I'm trying to add a SqlComputed property to the Question class (docFileName) where docFileName = Document.FileName if there is a related Document or an empty string if there isn't one.
I'd prefer the property to be SqlComputed so that if Question.Document changes, Question.docFileName will automatically update.
Does anyone know the syntax for accessing the properties of a related object in the SqlComputeCode?
Thanks!