EF Core - Add constraint on multiple properties that one of them is required but not all

前端 未结 0 367
轻奢々
轻奢々 2021-01-14 03:40

I have a class with some properties and I want to define a constraint on two properties (int type), that one of them is required but not both. In SQL it will like this:

相关标签:
回答
  • 消灭零回复
提交回复
热议问题