Skip to content

Instantly share code, notes, and snippets.



Created Aug 18, 2019
What would you like to do?
public SomeAbstractDto ToDto(SomeAbstractRepository repository)
if (repository == null) return null;
case DerivedSomeDto1 derivedSomeDto1 :
return ToDto(derivedSomeDto1);
case DerivedSomeDto18 derivedSomeDto18:
return ToDto(derivedSomeDto18);
throw InvalidOperationException("Operation not supported for given input");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment