--I have started experimenting with CQRS/ES and have created a very basic project. The idea is that I need to record details of model cars such as Matchbox, Corgi, Dinky, etc.I have broken it down into 3 aggregate roots:Manufacturer (Matchbox, Corgi, Dinky)Series (Matchbox->Hot Wheels, Matchbox->75s, etc)VehiclesA series must have a manufacturer, a vehicle must have a series.I have created a number of commands and events to allow the creation of manufacturers and series e.g.CreateManufacturerCreateSeriesCreateVehicleBefore allowing the user to delete a manufacturer I would like to check that there are no series linked to it. Similarly I would like to ensure that there are no vehicles linked to a series before allowing it to be deleted.How should this be handled? Should I create a service which uses the read models to determine if a manufacturer/series is in use before sending a DeleteManufactuer/DeleteSeries command or should the manufacturer/series domain objects (aggregate roots) internally track the number of items linked to it using the Apply override (i'm using CQRSLite)?If I go down the domain object path should the CreateSeries command be replaced with a AddSeries method on the manufacturer domain object?
You received this message because you are subscribed to the Google Groups "DDD/CQRS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dddcqrs+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/dddcqrs.
For more options, visit https://groups.google.com/d/optout.