Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created April 19, 2016 01:34
Show Gist options
  • Save dcomartin/b81ca008cee019f8ce3ea6ccfc457cc6 to your computer and use it in GitHub Desktop.
Save dcomartin/b81ca008cee019f8ce3ea6ccfc457cc6 to your computer and use it in GitHub Desktop.
public class Validation : IValidationHandler<Envelope<Command>>
{
public void Validate(Envelope<Command> message)
{
if (message.Body.CustomerId == Guid.Empty) throw new InvalidOperationException("CustomerId cannot be empty.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment