Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        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));
        }