Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • You can achieve this by creating unique index on Client and IsActive columns Commented Jun 24, 2019 at 7:57
  • Oh I get it. Basically it means if there is a client with true on isActive it cannot insert this again. But isn't this going to do the same for false? because the previous ones are all false. After client record is done updating it is set to false so client can start on a new record next time he logs in Commented Jun 24, 2019 at 7:58
  • you need to look at filtered index. EF can't provide you with an easy way here, but you can look at this question Commented Jun 24, 2019 at 8:06
  • 3
    something like CREATE UNIQUE NONCLUSTERED INDEX ... WHERE ([IsActive]=(1)) Commented Jun 24, 2019 at 8:07
  • I see thanks, sad this isn't supported yet tho. Commented Jun 24, 2019 at 8:08