ADO.NET Data Services and the Missing DataWebKeyAttribute

If you’ve hit this post it’s probably because you’ve been reading the Service Pack 1 documentation for Data Services and you’ve been trying to find the elusive DataWebKeyAttribute that the docs mention.

As far as I can tell, it’s not there. You need to use DataServiceKey instead and it lives in assembly System.Data.Services.Client under namespace System.Data.Services.Common and you appear to use it like;

public class Person
  public string FirstName { get; set; }
  public string LastName { get; set; }
  public int Age { get; set; }

which is slightly different from what you did with the DataWebKeyAttribute.