public async Task <IActionResult> PutSlide(Guid id, Slide slide) { if (id != slide.SlideId) { return(BadRequest()); } _context.Entry(slide).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SlideExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutProductCategory(Guid id, ProductCategory productCategory) { if (id != productCategory.ProductCategoryId) { return(BadRequest()); } _context.Entry(productCategory).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ProductCategoryExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }