简体   繁体   中英

EntityFramework DB First Keyword not supported: 'port'

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.

在此处输入图像描述

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"

In my case this error occurred with dot.net core and Microsoft.Data.SqlClient. The solution was to add

;TrustServerCertificate=true 

to the end of the connection string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM