Let’s take the technical issue first:
Concept is only for primitives.
Not everything on a command has to be a concept. . Concepts are only to give more domain meaning to your primitives. We have another structure Value if the thing follows value semantics rather than entity semantics but I’m guessing in your case it does have an identity in which case it’s just a class with an id and properties.
It’s perfectly acceptable to have an array / enumerable on a command. If you have wrapped this up into a class, then you can just put that class on your command. The only thing is that it has to be serializable to and from json. You might need to provide a serializer if it doesn’t have a default constructor / public setter.
What you are suggesting here doesn’t make much sense in terms of the modelling of aggregates and commands.
First, there isn’t a database. There is an event store with events and a read database that has persisted the projected state of these events.
An aggregate is a transaction boundary that is designed to maintain your invariant business rules. You want to make that as small as possible (for performance and concurrency reasons) while still maintaining your rules. A command is a specific transaction, it either succeeds of fails as a whole. It only operates on one aggregate.
A command that operates across multiple aggregates is not possible. You cannot maintain transactional consistency which is the very definition of the aggregate / command combination. If you do need to maintain transactional consistency, you’d have to model your aggregates to achieve this.
Of course, you can use the infrastructure of the command / command endpoint to send a message to the server with your data. Within your command handler you can execute commands against the specific aggregates. However, the bulk command will not be transactional. The individual commands that you fire off will be transactional. Remember also that you cannot return anything on a command result other than the success flag. That means you cannot return what happened on the individual commands on the bulk command result.
This is telling you that the bulk command isn’t actually a command. You can just add another endpoint that allows you to send this bulk data, performs the individual commands and returns the results. If it’s an MVC app, you can add a controller and just do what you want there.
But in doing this, you are saying that you are just doing crud operations (which is exactly the create, update, delete operations you are talking about). How do you know if these things exist, need updated? You could model another aggregate that tracks what things have been created (DataList and DataItem is again crud, not a rich domain), deleted and potentially what needs updated but this would have to be eventually consistent from the aggregates that represent the truth of the state of the “DataItem”.
Even this isn’t a good solution. If you have a json file that explains the state of the system, then the state is not in your application / in your event store. You should model this. If you turn your json file into a steam of events, subscribe to that stream from your bounded context and just write these to your read models. There is no need to go through any aggregate or issue any command. You don’t own these things any more. You are a passive recipient of the truth from another system.
If, for illustrations purposes, we say that it’s an order. In your system, you do create an order request and then send it to the external system. You’re system only owns the order request, not the order. You model your request as an aggregate and the order as a read model that is updated from events from the real order management system. You would probably model the request as a single message to the real order system. Once the message is sent, you can’t do anything else to that order request. If you want to update the order that was created, it’s a new request.
You need to think about where the “truth” lies and model accordingly. If you think of an event sourced system as a database and want to perform crud operations on it, you will struggle.