public async Task <IActionResult> PutcaseEngSoftItem(long id, caseEngSoftItem item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); try { int id_log = new t_log().Incluir("[HttpPut(\"{ id}\")]", "PutcaseEngSoftItem(long " + id.ToString() + ", caseEngSoftItem " + item.ToString() + ")", "INFO"); } catch (Exception ex) { throw ex; } return(NoContent()); }
public async Task <ActionResult <caseEngSoftItem> > PostcaseEngSoftItem(caseEngSoftItem item) { _context.caseEngSoftItems.Add(item); await _context.SaveChangesAsync(); try { int id_log = new t_log().Incluir("[HttpPost]", "PostcaseEngSoftItem(caseEngSoftItem " + item.ToString() + ")", "INFO"); } catch (Exception ex) { throw ex; } return(CreatedAtAction(nameof(GetcaseEngSoftItem), new { id = item.Id }, item)); }