Published Monday, May 19, 2008 1:42 AM by mtaulty

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;

[DataServiceKey("FirstName")]
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.


Filed Under: ,

# Interesting Finds: May 19, 2008 @ Monday, May 19, 2008 7:05 AM

Jason Haley

# Mais où est passé l'attribut "DataWebKeyAttribute" ? @ Monday, August 25, 2008 8:45 AM

Lorsqu'on parcourt le MSDN à la recherche de ressources sur la création de "Data Model" autre que EDM

Michel Perfetti [Miiitch]