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:
ALTER TABLE <table_name>
ADD CONSTRAINT <constraint_name> CHECK
((<first_field> IS NOT NULL AND <second_field> IS NULL) OR
(<second_field> IS NOT NULL AND <first_field> IS NULL))
Is it possible with FluentAPI?