I am trying to implement CQRS for the first time, and have an issue where I am receiving data from an external system which has a field which is a string reference, for example, username. I need to get the ID that the reference relates to, and reject if that ID isn't found.
The ID is from a separate bounded-context, and would seem inefficient to load the entire record to just get the ID. I was wondering if there was a CQRS pattern compliant way of returning just an ID based on a name/reference from the Command side, as it would seem like more of a Query concern (but maybe I'm being a bit naive?)