Parameterless constructor
Closed this issue · 0 comments
pearlxcore commented
I followed the tutorial too. When creating database, I encounter error which EF Core require a parameterless constructor. I try add this in Menu agreggate :
#pragma warning disable CS8618
private Menu() { }
#pragma warning restore CS8618
It shows error :
There is no argument given that corresponds to the required parameter 'id' of 'AggregateRoot.AggregateRoot(MenuId)'
I'm using Visual Studio 2022.