public async Task <ActionResult <Childeren> > PostChilderen(Childeren childeren) { _context.Childeren.Add(childeren); await _context.SaveChangesAsync(); return(CreatedAtAction("GetChilderen", new { id = childeren.Id }, childeren)); }
public async Task <IActionResult> PutChilderen(long id, Childeren childeren) { if (id != childeren.Id) { return(BadRequest()); } _context.Entry(childeren).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ChilderenExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public IContent GetItem(Guid?id) { if (id == null) { return(null); } return(Childeren.Where(m => m.DefinitionId == id).FirstOrDefault()); }
public VFSTree <T> AddChild(T child) { VFSTree <T> node = new VFSTree <T>(child) { Parent = this }; Childeren.Add(node); Index = node; return(Index); }