简体   繁体   English

EF Core 迁移错误:PositionalParameterNotFound,Add-Migration

[英]EF Core migration error: PositionalParameterNotFound,Add-Migration

I'm working with EntityFrameWork When I try to Run Command Add-Migration, I'm getting the following error我正在使用 EntityFrameWork 当我尝试运行命令添加迁移时,我收到以下错误

Add-Migration migration space
+ CategoryInfo          : InvalidArgument: (:) [Add-Migration], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Add-Migration

I find that this error occurred because there is a 'space' in the migration name.我发现发生此错误是因为迁移名称中有一个“空格”。 I also cannot create migration With special-Chars.我也无法使用特殊字符创建迁移。 Can some explain to me what are rules to be followed to add a new migration有人可以向我解释添加新迁移应遵循的规则吗

Migrations generate classes, so the migration name needs to be a valid C# class name.迁移生成类,因此迁移名称需要是有效的 C# class 名称。

This thread covers the naming rules for classes. 该线程涵盖了类的命名规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM