Last active
August 25, 2019 08:49
Command & Query Domain - Introduction - CQS interfaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Each action which mutates Domain's state implements this interface | |
public interface ICommandHandler<TCommand> | |
{ | |
void Handle(TCommand command); | |
} | |
// Each action which queries the Domain implements this interfaces | |
public interface IQuery<TResult> { } | |
public interface IQueryHandler<TQuery, TResult> where TQuery : IQuery<TResult> | |
{ | |
TResult Handle(TQuery query); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment