Last active
August 18, 2019 06:05
-
-
Save ankitvijay/faa37402c6b3d5d441259e24ceb34d12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public SomeAbstractDto ToDto(SomeAbstractRepository repository) | |
{ | |
if (repository == null) return null; | |
return (SomeAbstractDto)ToDto((dynamic)repository); | |
} | |
public DerivedSomeDto1 ToDto(DerivedSomeRepository1 repository) | |
{ | |
return new DerivedSomeDto1 | |
{ | |
SomeRandomProperty1 = repository.SomeRandomProperty1, | |
SomeRandomProperty2 = repository.SomeRandomProperty2 | |
} | |
} | |
. | |
. | |
. | |
public DerivedSomeDto18 ToDto(DerivedSomeRepository18 repository) | |
{ | |
return new DerivedSomeDto18 | |
{ | |
SomeRandomProperty1 = repository.SomeRandomProperty1 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment