Skip to content

Instantly share code, notes, and snippets.

@pfrozi
Created July 7, 2020 17:42
Show Gist options
  • Save pfrozi/be13468eb194628fe55fc3ebc9236daf to your computer and use it in GitHub Desktop.
Save pfrozi/be13468eb194628fe55fc3ebc9236daf to your computer and use it in GitHub Desktop.
EFCore2 -> EF6
# pattern1
HasColumnType\("(.+)\(([0-9]+)\)"\)
HasColumnType("$1").HasMaxLength($2)
# pattern2
HasColumnType\("(.+)\(([0-9]+)\,\s*([0-9]+)\)"\)
HasColumnType("$1").HasPrecision($2, $3)
# pattern3
HasColumnType\("(.+)\(\,\s*([0-9]+)\)"\)
HasColumnType("$1").HasPrecision(38, $2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment