Skip to content

Instantly share code, notes, and snippets.

@mdarnall
Created August 18, 2011 00:09
Show Gist options
  • Save mdarnall/1152978 to your computer and use it in GitHub Desktop.
Save mdarnall/1152978 to your computer and use it in GitHub Desktop.
abstract class BaseViewModel : IValidatable {
public LocationViewModel Origin { get; set;}
public LocationViewModel Dest { get; set; }
override IEnumerable<ValidationResult> Validate( ValidationContext context ) {
//copy ValidateFMViewModel logic
}
protected abstract LocationsCheckResult Check(string originToCheck, string destToCheck);
}
public class SearchCriteriaViewModel : BaseViewModel { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment