Referencing external libraries from the domain model
I received a great question from a reader recently. It’s about combining the domain model with an external library (edited for clarity): Hi Vladimir! I’m a big fan of your posts and courses. I have a design question, can you help me? I work on a project that uses AspNetCore.Identity for authentication. That library has an IdentityUser entity, which I use like this: AppUser : IdentityUser But a question arises… If I want another entity to have an Owner property (of type AppUser), this makes my Domain project reference the AspNetCore.
Should CQRS commands only contain primitive types?
I announced recently that I’ll be posting some smaller bits to this list that aren’t a good fit for the blogging format. So here’s the first of such bits. It’s an interesting question I received from a viewer of my CQRS in Practice Pluralsight course (reply to this email if you need a trial code that gives a 30 days unlimited access to Pluralsight, I still have some). The question is about CQRS commands and primitive types (shared with permission, edited lightly for clarity):