I am in the process of designing RESTful web services and got stuck at one point. The design is very simple with 3 entities:
- Project
- Status
- Employee
The part I am having trouble with is capturing the relationships:
- A project has a current status (1 to 1 between Project and Status).
- A project has multiple 'possible subsequent status' (1 to many between Project and Status).
The Visual Studio designer does not allow these two different relationships to be defined between these two entities. I am aware that it is just a modelling tool but at the same time, I am willing to know if this is the right approach.
Also, with this design, I am not sure how to access the Status entities using these two relationships.
http://serviceRootURL/Project(2)?$expand=Status // For current status
http://serviceRootURL/Project(2)?$expand=SubsequentStatus // For subsequent status
Is it possible to use arbitrary relationship names with the expand keyword?
(The question probably touches OData a little bit as well since I am trying to make my library OData-compliant.)