Composite UNIQUE INDEX on multiple columns EF Core

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
PixelHunter
Posts: 17
Joined: Thu 29 Jun 2017 11:07

Composite UNIQUE INDEX on multiple columns EF Core

Post by PixelHunter » Wed 31 Jul 2019 14:34

Hi!

I would like to have a composite unique key with three properties/columns, something like this: https://stackoverflow.com/questions/228 ... s-in-table.

How can I achieve this?

Is there a way to edit the script generated by the model, so that I can reflect this change in Sql Server?

Thanks in advance!

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Composite UNIQUE INDEX on multiple columns EF Core

Post by Shalex » Thu 01 Aug 2019 14:38

For each property, that participates in a composite unique index, open Property Editor, press [...] against Column to show Column Editor and set Unique Key (the same name for all properties within one composite unique key).

Post Reply