public async Task <ActionResult <StoryboardDetail> > PostStoryboardDetail(StoryboardDetail StoryboardDetail) { _context.StoryboardDetails.Add(StoryboardDetail); await _context.SaveChangesAsync(); return(CreatedAtAction("GetStoryboardDetail", new { id = StoryboardDetail.SBId }, StoryboardDetail)); }
public async Task <IActionResult> PutStoryboardDetail(int id, StoryboardDetail StoryboardDetail) { if (id != StoryboardDetail.SBId) { return(BadRequest()); } _context.Entry(StoryboardDetail).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StoryboardDetailExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }