Ejemplo n.º 1
0
 public void Adicionar(Objetivos objetivo)
 {
     try
     {
         _ctx.Objetivos.Add(objetivo);
         _ctx.SaveChanges();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
 public void Adicionar(Dicas dica)
 {
     try
     {
         _ctx.Dicas.Add(dica);
         _ctx.SaveChanges();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Ejemplo n.º 3
0
 public void Adicionar(Turmas turma)
 {
     try
     {
         _ctx.Turmas.Add(turma);
         _ctx.SaveChanges();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Ejemplo n.º 4
0
        public Usuarios Register(string nome, string email, string senha, string tipo)
        {
            Usuarios usuario = new Usuarios()
            {
                Nome = nome, Email = email, Senha = senha, Tipo = tipo
            };

            _context.Usuarios.Add(usuario);
            _context.SaveChanges();

            return(usuario);
        }