Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

127
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda