1

I want make model using db-first entity framwork.

so i enter the command like picture below.

but the error message shown as Keyword not supported: 'port'.

how do i fix this issue. thanks in advance.

enter image description here

JH. Lee
  • 29
  • 2

1 Answers1

1

the syntax is incorrect , here you don't need to add the keyword 'port' instead of that try using SERVER_NAME comma PORT_NUMBER like this . its worked for me !

"server=SERVER_NAME,PORT_NUMBER;user=USER_NAME;password=PASSWORD;database=DB_NAME"

jithin
  • 51
  • 3
  • thanks for your comment! i write the syntax as follow "caffold-DbContext "server=localhost,5432;user=postgres;password=691dlclf;database=AstDevManagement; TrustServerCertificate=True;Encrypt=false" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models2". But, the another error has occurred. Error Number:64,State:0,Class:20 A connection was successfully established with the server, but then an error occurred during the pre-login handshake. Sir, did you have seen this error before..? – JH. Lee Nov 29 '22 at 13:31