In DDD you always want to control what is being put into your domain object. That can be done with public getters and private setters. But when it comes to collections (e.g. System.Collections.Generic.List<T>) it becomes more complicated, due to the fact the the domain object exposes an object of type List<T> which can be modified.
Today i was creating EntityFrameworkCore DBContexts and it’s a time consuming work to delete the databases, add migrations and then update the database to see what the migration scripts would generate. I created a simple powershell-script that i ran when needed. Write-Host “Deleting the migrations folder…” Remove-Item “Migrations” -Force -Recurse Write-Host “Dropping database ASPD..” sqlcmd […]