public void SetIsAgreementConcluded(YesNoIrrelevantOption concluded) { IsAgreementConcluded = concluded; if (IsAgreementConcluded != YesNoIrrelevantOption.YES) { AgreementConcludedAt = null; } }
public static string GetReadableName(this YesNoIrrelevantOption yesNoIrrelevantOption) { return(yesNoIrrelevantOption switch { YesNoIrrelevantOption.NO => "Nej", YesNoIrrelevantOption.YES => "Ja", YesNoIrrelevantOption.IRRELEVANT => "Ikke relevant", YesNoIrrelevantOption.UNDECIDED => "", _ => throw new InvalidOperationException($"Invalid yesNoIrrelevantOption value: {yesNoIrrelevantOption}"), });
public Result <DataProcessingRegistration, OperationError> UpdateIsAgreementConcluded(int id, YesNoIrrelevantOption concluded) { return(Modify <DataProcessingRegistration>(id, registration => { registration.SetIsAgreementConcluded(concluded); return registration; })); }