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

Change default name of primary key

1 Answer 28 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.
dhait
Top achievements
Rank 1
dhait asked on 26 Jun 2013, 08:09 PM
Using the fluent code-first interface, is there a way to specify the name of primary key created for the table?

CONSTRAINT [pk_MyTable] PRIMARY KEY ([Field1], [Field2])


I want to call it something else besides pk_MyTable.

1 Answer, 1 is accepted

Sort by
0
Yordan
Telerik team
answered on 28 Jun 2013, 12:20 PM
Hi David,

Unfortunately at the moment it is not possible to set a custom name for the primary key constraint. The names of the primary keys are auto-generated and cannot be changed. I hope this is not a showstopper in your scenario.
If there is something else that we can help you with, please get back to us.
 
Regards,
Yordan
Telerik
OpenAccess ORM Q2 2013 brings you a more powerful code generation and a unique Bulk Operations support with LINQ syntax. Check out the list of new functionality and improvements shipped with this release.
Tags
Development (API, general questions)
Asked by
dhait
Top achievements
Rank 1
Answers by
Yordan
Telerik team
Share this question
or