Skip to content

Instantly share code, notes, and snippets.

@JEuler
Created September 22, 2021 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JEuler/0759b5dc4b6164dd0e7d9ca926cf1953 to your computer and use it in GitHub Desktop.
Save JEuler/0759b5dc4b6164dd0e7d9ca926cf1953 to your computer and use it in GitHub Desktop.
Extension class to convert between Web and DB entities
extension UserExtension on User {
DBUser getDbVersion() =>
DBUser(id, avatar ?? "", email ?? "", language ?? "", name ?? "");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment