The property '*' is not a String or Byte array. Length can only be configured for String and Byte array properties的问题解决
在EntityFramework中执行Migration操作时报错
The property '*' is not a String or Byte array. Length can only be configured for String and Byte array properties
发现时Model类Property设置了不当的Stringlength导致的
比如如下两种情况
不当的设置int的StringLength
不当的为bool设置StringLength
解决办法
如上代码所示,把不当设置的StringLength取消就可以正常操作了
















