public async Task <ActionResult <FirewallLogs> > PostFirewallLogs(FirewallLogs firewallLogs) { _context.FirewallLogs.Add(firewallLogs); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFirewallLogs", new { id = firewallLogs.Id }, firewallLogs)); }
public async Task <IActionResult> PutFirewallLogs(int id, FirewallLogs firewallLogs) { if (id != firewallLogs.Id) { return(BadRequest()); } _context.Entry(firewallLogs).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FirewallLogsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }