public async Task <ActionResult <Customreport> > PostCustomreport(Customreport customreport) { _context.Customreport.Add(customreport); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCustomreport", new { id = customreport.Id }, customreport)); }
public async Task <IActionResult> PutCustomreport(int id, Customreport customreport) { if (id != customreport.Id) { return(BadRequest()); } _context.Entry(customreport).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CustomreportExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }