public async STT.Task <IActionResult> Create([FromBody] SAVM.BondAgent bondAgent, CancellationToken ct) { if (bondAgent.Id == Guid.Empty) { bondAgent.Id = Guid.NewGuid(); } var createdBondAgent = await _BondAgentService.CreateAsync(bondAgent, ct); return(CreatedAtAction(nameof(this.Get), new { id = createdBondAgent.VmWareUuid }, createdBondAgent)); }
public async STT.Task <IActionResult> Update([FromRoute] Guid id, [FromBody] SAVM.BondAgent BondAgent, CancellationToken ct) { var updatedBondAgent = await _BondAgentService.UpdateAsync(id, BondAgent, ct); return(Ok(updatedBondAgent)); }