执行数据迁移反向工程Use the Force flag to overwrite these files.

The following file(s) already exist in directory E:\0web\SurveyWebApplication\WebApplication1\Models: SurveyDataContext.cs,Surveys.cs,TbAnswer.cs,TbCompany.cs,TbPerson.cs,TbProblem.cs,TbSurvey.cs,TbSurveyPart.cs,TbSurveyPartQuestion.cs. Use the Force flag to overwrite these files.

运用如下命令,添加一个强制覆盖文件

PM> Scaffold-DbContext "Data Source=.;Initial Catalog=SurveyData;Integrated Security=True" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models -force

声明:本站内容来源于原创和互联网,尊重作者版权,转载请注明来源网址,欢迎收藏,谢谢!