2
using (IDbConnection dbConnection = openConnection)
{
string uQuery = "INSERT INTO User (Email, UserName, Password)"
+ " VALUES(@Email, @UserName, @Password)";
dbConnection.Open();
dbConnection.Execute(uQuery, User);
}
我得到一個sql異常:關鍵字'User'附近的語法不正確。 db.Connection.Execute語句上的。即使省略語句的用戶參數,我也會得到相同的錯誤。我在做插入錯誤?在asp.net核心上使用Dapper插入