Ejemplo n.º 1
0
 public ActionResult Put(int id, [FromBody] Permissoes value)
 {
     using (var db = new iSoftVendasContext())
     {
         db.Entry(value).State = EntityState.Modified;
         db.SaveChanges();
         return(new ObjectResult("modified successfully!"));
     }
 }
Ejemplo n.º 2
0
 public ActionResult Delete(int id)
 {
     using (var db = new iSoftVendasContext())
     {
         db.Permissoes.Remove(db.Permissoes.Find(id));
         db.SaveChanges();
         return(new ObjectResult("deleted successfully!"));
     }
 }
Ejemplo n.º 3
0
 public ActionResult Post([FromBody] Permissoes value)
 {
     using (var db = new iSoftVendasContext())
     {
         db.Permissoes.Add(value);
         db.SaveChanges();
         return(new ObjectResult("successfully!"));
     }
 }