Created
October 17, 2020 21:22
-
-
Save lakshyabatman/dbb41690cbb87ef207944cd446a27cd5 to your computer and use it in GitHub Desktop.
User Service
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
class UserService { | |
constructor(private readonly userRepository : UserRepository) { | |
// Here the userRepository is abstracted! | |
} | |
getUser(id : String) : UserEntity { | |
return this.userRepository.getAll() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment