I have two DbContext in my project, i am trying to run EF Add-Migration pointing to a specific DbContext, but i have being encountering the below error.
Add-Migration Initial -ContextTypeName System.BLL.Contexts.TenantDbContext
Add-Migration : A parameter cannot be found that matches parameter name 'ContextTypeName'.
At line:1 char:23
+ Add-Migration InitialCreation -ContextTypeName System.BLL.Contexts.TenantDbCo ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Add-Migration], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Add-Migration
I also specified the Default Project from the drop-down.
Enable-Migrations
command. From where did you get that? – Pleasant-Context
parameter. – NeurologistEntityFramework
? Or, do you usedEntityFrameworkCore
?ContextTypeName
is used inEnable-Migrations
. DoesAdd-Migration
work for the only oneDbContext
? Is there any specific reason you needEntityFramework
instead ofEntityFrameworkCore
. – Dalmatian