public async Task <IActionResult> PuttenancyTerminationReason(int id, tenancyterminationreason tenancyterminationreason) { if (id != tenancyterminationreason.tenancyTerminationReasonId) { return(BadRequest()); } _context.Entry(tenancyterminationreason).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!tenancyterminationreasonExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <tenancyterminationreason> > PosttenancyTerminationReason(tenancyterminationreason tenancyterminationreason) { _context.tenancyterminationreason.Add(tenancyterminationreason); await _context.SaveChangesAsync(); return(CreatedAtAction("Gettenancyterminationreason", new { id = tenancyterminationreason.tenancyTerminationReasonId }, tenancyterminationreason)); }