This is a migrated thread and some comments may be shown as answers.

Allow SQL Server to autogenerate values

2 Answers 56 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Cristian Apavaloaiei
Top achievements
Rank 2
Cristian Apavaloaiei asked on 28 Oct 2010, 03:10 PM
Hello,

Is it possible to have fields that are autogenerated when adding items to the database?
For example,a GUID primary key, a field that is an autoincrementing int but is not a primary key, or a field that specifies the current date and time.

Thank you

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 02 Nov 2010, 08:18 PM
Hi Cristian Apavaloaiei,

You can define properties mapped to such columns as read-only. This way they will not be included in the insert / update SQL statements and will be left to the sql server to generate them. To enable this option, select a property from the dsl diagram, go to the Properties pane (or press F4) and set the Kind property to PersistentReadOnly. Hope that helps.

All the best,
Alexander
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Cristian Apavaloaiei
Top achievements
Rank 2
answered on 03 Nov 2010, 09:32 AM
Thank you
Tags
Development (API, general questions)
Asked by
Cristian Apavaloaiei
Top achievements
Rank 2
Answers by
Alexander
Telerik team
Cristian Apavaloaiei
Top achievements
Rank 2
Share this question
or