I'm developing a WCF REST web service using C# and .NET 4.0 framework.
I'm not sure about how to design the web service.
On my system there are activities and users. Users can do activities: ride a bicycle, play football, go out with friends, ...
This is userActivity
class:
[DataContract]
public class UserActivity
{
[DataMember]
public int userId { get; set; }
[DataMember]
public int activityId { get; set; }
}
And this how I have designed the web service:
Is it correct to do it this way? I know, I can do wherever I want, but I'm not sure if my web service is well designed.
Maybe, I can add an activity to a user this way (changing POST method):
What do you think?