public void Liberar(int id) { // Utilizamos o ID 01, pois é o colaborador Livre var acessoColaborador = FindViewById(id); acessoColaborador.Colaborador = _context.Colaboradores.Find(1); _context.Entry(acessoColaborador).State = System.Data.Entity.EntityState.Modified; }
public ActionResult Edit([Bind(Include = "Id,Quantidade,Valor,Codigo")] Cupons cupons) { if (ModelState.IsValid) { db.Entry(cupons).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cupons)); }
public ActionResult Edit([Bind(Include = "iD,Nome,Descricao,Preco")] Servico servico) { if (ModelState.IsValid) { db.Entry(servico).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(servico)); }
public void Update(Acesso acesso) { _context.Entry(acesso).State = System.Data.Entity.EntityState.Modified; }