Data Access has been discontinued. Please refer to this page for more information.

KeyGeneratorAttribute

This article is relevant to entity models that utilize the deprecated Visual Studio integration of Telerik Data Access. The current documentation of the Data Access framework is available here.

The KeyGeneratorAttribute is used to specify the key generator of a persistent type. You could set the KeyGeneratorAttribute to one of these values:

  • Default - specifies that the default value for the key generator will be used by the runtime. The runtime might calculate this value on a later stage depending on the other settings of the meta model or the specific backend used.
  • Autoinc - defines the 'AUTOINC' key generator.
  • Guid - defines the 'Guid' key generator.
  • HighLow - defines the 'HighLow' key generator.
  • Verify - defines the 'Verify' key generator.
[Telerik.OpenAccess.KeyGenerator(Telerik.OpenAccess.Metadata.KeyGenerator.Guid)]
class Category
{
   // Class body
}
<Telerik.OpenAccess.KeyGenerator(Telerik.OpenAccess.Metadata.KeyGenerator.Guid)>
Friend Class Category
 ' Class body
End Class