public async Task <IActionResult> PutProductService(string id, ProductService productService) { if (id != productService.Id) { return(BadRequest()); } _context.Entry(productService).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductServiceExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async void SaveChangeAsyc() { await _context.SaveChangesAsync(); }