public void AddNovoMatch(NovoMatch novoMatch)
        {
            var connection = _db.Database.GetDbConnection();

            connection.Query("SpNovoMatch_AddNovoMatch", new
            {
                id = novoMatch.Id,
                usuarioPrimario   = novoMatch.UsuarioPrimario,
                usuarioSecundario = novoMatch.UsuarioSecundario
            }, commandType: CommandType.StoredProcedure);
        }
        public Task <Unit> Handle(AddNovoMatchCommand command, CancellationToken cancellationToken)
        {
            if (!command.IsValid())
            {
                NotifyValidationErrors(command);
                return(Unit.Task);
            }


            var user = new NovoMatch(command.UsuarioPrimario, command.UsuarioSecundario);

            _novoMatchRepository.AddNovoMatch(user);

            if (Commit())
            {
                // raise event
            }

            return(Unit.Task);
        }