你不是code first么,直接写一个实体类,在数据库初始化类里面添加下,运行程序就建立对应的表了。
https://jingyan.baidu.com/article/3aed632e28b6d970108091b0.html这里有教程