예제 #1
0
        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));
        }
예제 #2
0
        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());
        }