public async Task <ActionResult <LogsV1> > PostLogsV1(LogsV1 logsV1) { hLogsContext.LogsV1.Add(logsV1); await hLogsContext.SaveChangesAsync(); return(CreatedAtAction("GetLogsV1", new { id = logsV1.Id }, logsV1)); }
public async Task <IActionResult> PutLogsV1(int id, LogsV1 logsV1) { if (id != logsV1.Id) { return(BadRequest()); } hLogsContext.Entry(logsV1).State = EntityState.Modified; try { await hLogsContext.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LogsV1Exists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }