Exemplo n.º 1
0
        protected override void WholeInclude()
        {
            Context.concrete_parts.Include(cpart => cpart.parts)
            .Include(cpart => cpart.materials)
            .Include(cpart => cpart.colors)
            .Load();

            PartRepo.WholeIncludeCommon(Context);
            MaterialRepo.WholeIncludeCommon(Context);
        }
Exemplo n.º 2
0
        protected override void SingleInclude(ConcretePartEntity entity)
        {
            if (entity == null)
            {
                return;
            }

            Context.Entry <ConcretePartEntity>(entity).Reference(cpart => cpart.parts).Load();
            PartRepo.SingleIncludeCommon(Context, entity.parts);

            Context.Entry <ConcretePartEntity>(entity).Reference(cpart => cpart.materials).Load();
            MaterialRepo.SingleIncludeCommon(Context, entity.materials);

            Context.Entry <ConcretePartEntity>(entity).Reference(cpart => cpart.colors).Load();
        }
Exemplo n.º 3
0
        protected override void WholeInclude()
        {
            Context.furniture_items.Include(furniture => furniture.furniture_item_parts_connections).Load();
            Context.furniture_items.Include(furniture => furniture.used_parts).Load();
            Context.furniture_item_parts_connections.Include(connection => connection.parts_connection_glues)
            .Include(connection => connection.two_parts_connection)
            .Load();
            Context.two_parts_connection.Include(connection => connection.part_controllers_embed_relative_positions)
            .Include(connection => connection.part_controllers_embed_relative_positions1)
            .Include(connection => connection.two_parts_connection_glues).Load();

            Context.parts_connection_glues.Include(glue => glue.parts).Load();
            Context.two_parts_connection_glues.Include(glue => glue.parts).Load();
            Context.part_controllers_embed_relative_positions.Include(helper => helper.parts).Load();

            PartRepo.WholeIncludeCommon(Context);
        }
Exemplo n.º 4
0
        protected override void SingleInclude(FurnitureItemEntity entity)
        {
            if (entity == null)
            {
                return;
            }

            Context.Entry <FurnitureItemEntity>(entity).Collection(furniture => furniture.furniture_item_parts_connections).Load();
            Context.Entry <FurnitureItemEntity>(entity).Collection(furniture => furniture.used_parts).Load();

            foreach (FurnitureItemPartsConnectionEntity globalConnection in entity.furniture_item_parts_connections)
            {
                Context.Entry <FurnitureItemPartsConnectionEntity>(globalConnection).Collection(connection => connection.parts_connection_glues).Load();
                Context.Entry <FurnitureItemPartsConnectionEntity>(globalConnection).Collection(connection => connection.two_parts_connection).Load();

                foreach (PartsConnectionGlueEntity globalGlue in globalConnection.parts_connection_glues)
                {
                    Context.Entry <PartsConnectionGlueEntity>(globalGlue).Reference(glue => glue.parts).Load();
                    PartRepo.SingleIncludeCommon(Context, globalGlue.parts);
                }

                foreach (TwoPartsConnectionEntity twoPartConnection in globalConnection.two_parts_connection)
                {
                    DbEntityEntry <TwoPartsConnectionEntity> twoPartsConnectionEntry = Context.Entry <TwoPartsConnectionEntity>(twoPartConnection);

                    twoPartsConnectionEntry.Reference(connection => connection.part_controllers_embed_relative_positions).Load();
                    twoPartsConnectionEntry.Reference(connection => connection.part_controllers_embed_relative_positions1).Load();

                    Context.Entry <PartControllerEmbedRelativePositionEntity>(twoPartConnection.part_controllers_embed_relative_positions).Reference(helper => helper.parts).Load();
                    Context.Entry <PartControllerEmbedRelativePositionEntity>(twoPartConnection.part_controllers_embed_relative_positions1).Reference(helper => helper.parts).Load();

                    PartRepo.SingleIncludeCommon(Context, twoPartConnection.part_controllers_embed_relative_positions.parts);
                    PartRepo.SingleIncludeCommon(Context, twoPartConnection.part_controllers_embed_relative_positions1.parts);

                    twoPartsConnectionEntry.Collection(connection => connection.two_parts_connection_glues).Load();

                    foreach (TwoPartsConnectionGlueEntity twoPartsGlue in twoPartConnection.two_parts_connection_glues)
                    {
                        Context.Entry <TwoPartsConnectionGlueEntity>(twoPartsGlue).Reference(glue => glue.parts).Load();
                        PartRepo.SingleIncludeCommon(Context, twoPartsGlue.parts);
                    }
                }
            }
        }