Niestandardowy atrybut sprawdzania poprawności, który porównuje wartość mojej właściwości z wartością innej właściwości w mojej klasie modelu

Chcę utworzyć niestandardowy atrybut sprawdzania poprawności, w którym chcę porównać wartość mojej właściwości z wartością innej właściwości w mojej klasie modelu. Na przykład mam w swojej klasie modelu:

...    
public string SourceCity { get; set; }
public string DestinationCity { get; set; }

I chcę utworzyć niestandardowy atrybut, aby użyć go w ten sposób:

[Custom("SourceCity", ErrorMessage = "the source and destination should not be equal")]
public string DestinationCity { get; set; }
//this wil lcompare SourceCity with DestinationCity

Jak mogę się tam dostać?

questionAnswers(3)

yourAnswerToTheQuestion