با سلام خدمت همه دوستان و اساتید
دوستان من یه پروژه با معماری پیاز نوشتم
کسی میدونه این مایگریشن چرا داره خطا میده؟
در صورتی که قبلش من صد ها مایگریشن زدم رو همین پروژه

متن خطا با جزییات رو میزارم ممنون میشم کسی کمک کنه


Add-Migration mig0 -Verbose
Using project 'Infrastructure\Hayel.Infrastructure.EfCore'.
Using startup project 'Presentation\Hayel.EndPointApp.MainApp'.
Build started...
Build succeeded.
D:\My_Projects\HayelFastFood\HayelFastFood\package s\Microsoft.EntityFrameworkCore.Tools.3.1.15\tools \net461\any\ef.exe migrations add mig0 --json --verbose --no-color --prefix-output --assembly D:\My_Projects\HayelFastFood\HayelFastFood\Hayel.E ndPontApp.MainApp\bin\Debug\Hayel.Infrastructure.E fCore.dll --startup-assembly D:\My_Projects\HayelFastFood\HayelFastFood\Hayel.E ndPontApp.MainApp\bin\Debug\Hayel.EndPointApp.Main App.exe --project-dir D:\My_Projects\HayelFastFood\HayelFastFood\Hayel.I nfrastructure.EfCore\ --language C#‎ --working-dir D:\My_Projects\HayelFastFood\HayelFastFood --root-namespace Hayel.Infrastructure.EfCore
Using assembly 'Hayel.Infrastructure.EfCore'.
Using startup assembly 'Hayel.EndPointApp.MainApp'.
Using application base 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. EndPontApp.MainApp\bin\Debug'.
Using working directory 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. EndPontApp.MainApp'.
Using root namespace 'Hayel.Infrastructure.EfCore'.
Using project directory 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. Infrastructure.EfCore\'.
Using configuration file 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. EndPontApp.MainApp\bin\Debug\Hayel.EndPointApp.Mai nApp.exe.config'.
Using assembly 'Hayel.Infrastructure.EfCore'.
Using startup assembly 'Hayel.EndPointApp.MainApp'.
Using application base 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. EndPontApp.MainApp\bin\Debug'.
Using working directory 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. EndPontApp.MainApp'.
Using root namespace 'Hayel.Infrastructure.EfCore'.
Using project directory 'D:\My_Projects\HayelFastFood\HayelFastFood\Hayel. Infrastructure.EfCore\'.
Finding DbContext classes...
Finding IDesignTimeDbContextFactory implementations...
Finding application service provider...
Finding Microsoft.Extensions.Hosting service provider...
No static method 'CreateHostBuilder(string[])' was found on class 'Program'.
No application service provider was found.
Finding DbContext classes in the project...
Found DbContext 'HayelDbContext'.
Microsoft.EntityFrameworkCore.Design.OperationExce ption: Unable to create an object of type 'HayelDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728 ---> System.MissingMethodException: No parameterless constructor defined for this object.
at System.RuntimeTypeHandle.CreateInstance(RuntimeTyp e type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.EntityFrameworkCore.Design.Internal.DbCo ntextOperations.<>c__DisplayClass13_3.<FindContext Types>b__13()
--- End of inner exception stack trace ---
at Microsoft.EntityFrameworkCore.Design.Internal.DbCo ntextOperations.<>c__DisplayClass13_3.<FindContext Types>b__13()
at Microsoft.EntityFrameworkCore.Design.Internal.DbCo ntextOperations.CreateContext(Func`1 factory)
at Microsoft.EntityFrameworkCore.Design.Internal.DbCo ntextOperations.CreateContext(String contextType)
at Microsoft.EntityFrameworkCore.Design.Internal.Migr ationsOperations.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExec utor.AddMigrationImpl(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExec utor.OperationBase.<>c__DisplayClass3_0`1.<Execute >b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExec utor.OperationBase.Execute(Action action)
Unable to create an object of type 'HayelDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728