Beispiel #1
0
        public static void WholeIncludeCommon(FurnitureHelperContext context)
        {
            context.parts.Include(part => part.materials)
            .Include(part => part.part_controllers_embed_relative_positions)
            .Load();

            MaterialRepo.WholeIncludeCommon(context);
        }
Beispiel #2
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);
        }
Beispiel #3
0
        public static void SingleIncludeCommon(FurnitureHelperContext context, PartEntity entity)
        {
            if (entity == null)
            {
                return;
            }

            context.Entry <PartEntity>(entity).Collection(part => part.materials).Load();
            MaterialRepo.ForEachIncludeCommon(context, entity.materials);
            context.Entry <PartEntity>(entity).Collection(part => part.part_controllers_embed_relative_positions).Load();
        }
Beispiel #4
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();
        }