public static SetOfGenericPolymorph Create(int id)
        {
            Random rnd = new Random();

            return(new SetOfGenericPolymorph()
            {
                Id = id,
                Set = new List <MappedObjectGeneric <PolymorphicBaseClass> > ()
                {
                    MappedObjectGeneric <PolymorphicBaseClass> .Create(1, PolymorphicBaseClass.Create(10)),
                    MappedObjectGeneric <PolymorphicBaseClass> .Create(2, PolymorphicSubClass.Create(11)),
                    MappedObjectGeneric <PolymorphicBaseClass> .Create(3, PolymorphicSubSubClass.Create(12))
                }
            });
        }
Beispiel #2
0
        public static SetOfPolymorphic Create(int id)
        {
            Random rnd = new Random();

            return(new SetOfPolymorphic()
            {
                Id = id,
                PolymorphicBaseClasses = new List <PolymorphicBaseClass>()
                {
                    PolymorphicBaseClass.Create(rnd.Next()),
                    PolymorphicSubClass.Create(rnd.Next()),
                    PolymorphicSubSubClass.Create(rnd.Next())
                }
            });
        }