public async Task <ActionResult <propertynote> > Postpropertynote(propertynote propertynote) { _context.propertynote.Add(propertynote); await _context.SaveChangesAsync(); return(CreatedAtAction("Getpropertynote", new { id = propertynote.propertyNoteId }, propertynote)); }
public async Task <IActionResult> Putpropertynote(int id, propertynote propertynote) { if (id != propertynote.propertyNoteId) { return(BadRequest()); } _context.Entry(propertynote).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!propertynoteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }