public async Task <ActionResult <Tb07002Permissoes> > PostTb07002Permissoes(Tb07002Permissoes tb07002Permissoes) { _context.Tb07002Permissoes.Add(tb07002Permissoes); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTb07002Permissoes", new { id = tb07002Permissoes.PermissoesId }, tb07002Permissoes)); }
public async Task <IActionResult> PutTb07002Permissoes(int id, Tb07002Permissoes tb07002Permissoes) { if (id != tb07002Permissoes.PermissoesId) { return(BadRequest()); } _context.Entry(tb07002Permissoes).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Tb07002PermissoesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }