예제 #1
0
        public void Remover(int id)
        {
            Entities.tb_function remover = db.tb_function.First(t => t.id_function == id);

            db.tb_function.Remove(remover);
            db.SaveChanges();
        }
예제 #2
0
        public void Alterar(Entities.tb_function function)
        {
            Entities.tb_function list = db.tb_function.First(t => t.id_function == function.id_function);

            list.nm_function = list.nm_function;

            db.SaveChanges();
        }
예제 #3
0
        public Entities.tb_function ConsultaPorID(int id)
        {
            Entities.tb_function function = db.tb_function.FirstOrDefault(t => t.id_function == id);

            return(function);
        }
예제 #4
0
        public List <Entities.tb_function> ConsultarPorNome(Entities.tb_function function)
        {
            List <Entities.tb_function> list = db.tb_function.Where(l => l.nm_function == function.nm_function).ToList();

            return(list);
        }
예제 #5
0
        public void Inserir(Entities.tb_function function)
        {
            db.tb_function.Add(function);

            db.SaveChanges();
        }