Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

131
Visualizações
Build a one page nested parent-child organizational structure

I need to create this kind of organizational structure using .Net MVC, vanilla JS and jQuery Every parent and it's children can be modified, deleted, and you also should be able to add new ones. I think using one model should be enough? Because that model will represent both parent and child, because a parent can be a child as well. And then your usual CRUD operations, although I am not sure what I'll be passing to the controller to create a child for a chosen parent.

How I imagine it to look

    public class Entity
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }

    public IList<Entity> Chidren { get; set; }
}

Or should the model look like this?

    public class Entity
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }

    public int ParentId { get; set; } 
    public Entity Parent { get; set; }
}

Anything else I should think about?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda