public void CriarAluno(string cpf, string nome)
        {
            Aluno aluno = new Aluno()
            {
                CPF  = cpf,
                Nome = nome
            };

            contexto.Alunos.Add(aluno);
            contexto.SaveChanges();
        }
 public int Add(Aluno entity)
 {
     _contexto.Alunos.Add(entity);
     _contexto.SaveChanges();
     return(entity.Id);
 }
 public int Add(Professor entity)
 {
     _contexto.Professores.Add(entity);
     _contexto.SaveChanges();
     return(entity.Id);
 }
Beispiel #4
0
 public int Add(Grade entity)
 {
     _contexto.Grades.Add(entity);
     _contexto.SaveChanges();
     return(entity.Id);
 }