Skip to content

Instantly share code, notes, and snippets.

@lakshyabatman
Created October 17, 2020 21:22
Show Gist options
  • Save lakshyabatman/dbb41690cbb87ef207944cd446a27cd5 to your computer and use it in GitHub Desktop.
Save lakshyabatman/dbb41690cbb87ef207944cd446a27cd5 to your computer and use it in GitHub Desktop.
User Service
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