/// <summary> /// Adds new link to store /// </summary> public async Task Add(ILink link) { var row = MapRow(link); dbContext.Link.Add(row); await dbContext.SaveChangesAsync(); }
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()); }
public async Task Delete(int id) { var row = new ActorTableRow { Id = id }; dbContext.Entry(row).State = EntityState.Deleted; await dbContext.SaveChangesAsync(); await linkDataService.Remove(new Node(id, StoryboardNodeTypes.Actor)); }