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

Mike's Badges

Follow on Twitter
View mike's profile on slideshare
Add to Technorati Favorites
CW Blog Awards

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
(C) Mike Taulty, 2009. All rights reserved. The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems