예제 #1
0
        private int Inserir(Pessoa pessoa)
        {
            const string commandText = " INSERT INTO Pessoa (nome, cpf, telefone) VALUES (@nome, @cpf, @telefone) ";

            var parameters = new Dictionary <string, object>
            {
                { "nome", pessoa.nome },
                { "cpf", pessoa.cpf },
                { "telefone", pessoa.telefone }
            };

            return(contexto.ExecutaComando(commandText, parameters));
        }