Click to Rate and Give Feedback
MSDN
MSDN Library
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Data Model (ADO.NET Data Services Framework)

The content in this topic has been moved. For more information, see Data Services Providers (ADO.NET Data Services).

Community Content   What is Community Content?
Add new content RSS  Annotations
error in code example      Nostromo   |   Edit   |   Show History
the member OrderKeyID of OrderKey class (and other class) are
decorate with the wrong DataWebKeyAttribute instead of

DataServiceKeyAttribute

Tags What's this?: Add a tag
Flag as ContentBug
Re: error in code example      DanVladut   |   Edit   |   Show History
DataWebKeyAttribute was initially used in ASP.Net 3.5 extensions, after VS 2008 SP1 was released DataServiceKeyAttribute replaced it but it is wrongly used in the example above .
The code should be something like:

[DataServiceKey("OrderKey")]
public class Order
{
...
//no attribute here
public int OrderKey
{
get { return _ID; }
}
...
}
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker