Entity
A WebService entity can have multiple keys to be uniquely identified.
namespace UserServices
{
[DataServiceKey("Name")]
[DataServiceEntity]
public class Person
{
public string FirstName {get; set;}
public string LastName {get; set;}
public string Address {get; set;}
public int? Age {get; set;}
}
}
Example:
Get Person with Key: http://localhost:8080/sap/opu/odata/Test/TEST_SRV/Persons(‘Angela’)
Supported Types
All primitive types are supported, click to see them. System.Object is NOT supported.