public async Task<IActionResult> PutProductTypeDesignService(int id, ProductTypeDesignService productTypeDesignService) { if (id != productTypeDesignService.ProductTypeDesignServiceId) { return BadRequest(); } _context.Entry(productTypeDesignService).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductTypeDesignServiceExists(id)) { return NotFound(); } else { throw; } } return NoContent(); }
public async Task<ActionResult<ProductTypeDesignService>> PostProductTypeDesignService(ProductTypeDesignService productTypeDesignService) { _context.productTypeDesignService.Add(productTypeDesignService); await _context.SaveChangesAsync(); return CreatedAtAction("GetProductTypeDesignService", new { id = productTypeDesignService.ProductTypeDesignServiceId }, productTypeDesignService); }