I have a system that uses a graph database without any ORM, mapper or tool that tracks entity changes, like EntityFramework. I'm not using domain entities, instead I have an Event that calls changes directly in Commands.
Instead of having a entity like that
Community{
public string Title {get;set;}
Handle(ChangeDetails @event){
title = @event.title
}
}
I have a CQRS command that changes two databases at same time, so, in my "event" sourcing I have something "command sourcing" that I can replay those commands to reconstruct the database with changes made, like this:
CommunityWriteCommands{
Handle(ChangeTitleOrDescriptionEvent @event){
GraphDatabase.community(@eventId).set("title", @title).set("description", @eventDescription)
}
}
This could be considered "wrong" or "incorrect" from the perspective of Software engineering/DDD/CleanArch etc? Without any ORM/EntityFramework or tool that tracks changes, seems to me better to store commands than domain entities events (i'm not even using domain entities)