public async Task <IActionResult> PutProductoCuota(int id, PCProductoCuota pCProductoCuota) { if (id != pCProductoCuota.Id) { return(BadRequest()); } _context.Entry(pCProductoCuota).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductoCuotaExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PCProductoCuota> > PostProductoCuota(PCProductoCuota pCProductoCuota) { _context.PCProductoCuota.Add(pCProductoCuota); await _context.SaveChangesAsync(); return(CreatedAtAction("GetProductoCuota", new { id = pCProductoCuota.Id }, pCProductoCuota)); }
public async Task <HttpResponseMessage> UpdateProductoCuotaAsync(int id, PCProductoCuota pCProductoCuota) { var client = new HttpClient(); return(await client.PutAsync($"{baseUrl}api/ProductoCuota/{id}", getStringContentFromObject(pCProductoCuota))); }
public async Task <HttpResponseMessage> InsertProductoCuotaAsync(PCProductoCuota pCProductoCuota) { var client = new HttpClient(); return(await client.PostAsync($"{baseUrl}api/ProductoCuota", getStringContentFromObject(pCProductoCuota))); }