Error while executing Add-Migration Setup

0

When executing the Add-Migration Setup command to create the table in SQL Server in the PM the message below occurs even though I do the api project reference with the shared. The system even gets to process something, but soon gives this error.

  

No DbContext was found in assembly 'YouLearn.Api'. Ensure that you are using the correct assembly and that the type is neither abstract nor generic.

Follow the solution link

    
asked by anonymous 05.10.2018 / 15:42

1 answer

0

As your EF context class ( YouLearnContext ) is in ddd-net-core / YouLearn.Infra / Persistence / EF /, then when executing the Add-Migration Setup command you have to select the YouLearn.Infra project.

    
05.10.2018 / 18:29