环境: EntityFrameWork CodeFirst+MySql
今天在提交一个外键字段的修改时报“Parameter '@columnType' must be defined.”
google了一下
解决方法在链接字符串中加入这样一句话“;Allow User Variables=True”就可以了。
<add name="AccountDB" connectionString="server=localhost;user id=root;password=root;port=3306;database=Account;Allow User Variables=True" providerName="MySql.Data.MySqlClient" />