Mike Taulty's Blog
Bits and Bytes from Microsoft UK
ADO.NET Data Services and the Missing DataWebKeyAttribute

Blogs

Mike Taulty's Blog

Elsewhere

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.


Posted Mon, May 19 2008 1:42 AM by mtaulty
Filed under: ,

Comments

Jason Haley wrote Interesting Finds: May 19, 2008
on Mon, May 19 2008 7:05 AM
Michel Perfetti [Miiitch] wrote Mais où est passé l'attribut "DataWebKeyAttribute" ?
on Mon, Aug 25 2008 8:45 AM
Lorsqu'on parcourt le MSDN à la recherche de ressources sur la création de "Data Model" autre que EDM