Esempio n. 1
0
        public bool Inserir(LaboratorioVO laboratorioVO)
        {
            DB_LaboratorioEntities context = new DB_LaboratorioEntities();

            context.tb_laboratorio.Add(Converte.ToLaboratorio(laboratorioVO));
            int retorno = context.SaveChanges();


            if (retorno == 1)
            {
                return(true);
            }
            return(false);
        }
Esempio n. 2
0
 public static tb_laboratorio ToLaboratorio(LaboratorioVO laboratorioVO)
 {
     return(new tb_laboratorio()
     {
         id = laboratorioVO.id,
         nome = laboratorioVO.nome,
         qtdComputadores = laboratorioVO.qtdComputadores,
         qtdAlunos = laboratorioVO.qtdAlunos,
         projetor = laboratorioVO.projetor,
         software1 = laboratorioVO.software1,
         software2 = laboratorioVO.software2,
         software3 = laboratorioVO.software3,
         sistemaOperacional = laboratorioVO.sistemaOperacional
     });
 }
Esempio n. 3
0
 public bool Inserir(LaboratorioVO laboratorioVO)
 {
     return(new Dados().Inserir(laboratorioVO));
 }