public async Task <IActionResult> Putdocslevelpost(long id, docslevelpost docslevelpost) { if (id != docslevelpost.Id) { return(BadRequest()); } _context.Entry(docslevelpost).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!docslevelpostExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <docslevelpost> > Postdocslevelpost(docslevelpost docslevelpost) { _context.docslevelposts.Add(docslevelpost); await _context.SaveChangesAsync(); return(CreatedAtAction("Getdocslevelpost", new { id = docslevelpost.Id }, docslevelpost)); }