public void Setup()
            {
                entity = new EntityImpl("Child");
                parent = new EntityImpl("Parent");
                parent.AddChild(entity);

                property = new PropertyImpl { Name = "Prop1"};
                parent.AddProperty(property);
            }
        public void SetUp()
        {
            entities = new EntitySetImpl();

            entity1 = new EntityImpl("Entity1");
            entity1.AddProperty(new PropertyImpl("PrimaryKey") { Type = "System.Int32", IsKeyProperty = true });
            entity1.AddProperty(new PropertyImpl("Property") { Type = "bool" });

            entity2 = new EntityImpl("Entity2");
            entity2.AddProperty(new PropertyImpl("PrimaryKey") { Type = "System.Int32", IsKeyProperty = true });

            entities.AddEntity(entity1);
            entities.AddEntity(entity2);

            reference = entity1.CreateReferenceTo(entity2);
            reference.Cardinality1 = Cardinality.One;
            reference.Cardinality2 = Cardinality.One;
        }
        public void SetUp()
        {
            entities = new EntitySetImpl();

            entity1 = new EntityImpl("Entity1");
            entity1.AddProperty(new PropertyImpl("PrimaryKey") { Type = "System.Int32", IsKeyProperty = true });

            entity2 = new EntityImpl("Entity2");
            entity2.AddProperty(new PropertyImpl("PrimaryKey") { Type = "System.Int32", IsKeyProperty = true });

            entities.AddEntity(entity1);
            entities.AddEntity(entity2);

            reference = entity1.CreateReferenceTo(entity2);
            reference.Cardinality1 = Cardinality.Many;
            reference.Cardinality2 = Cardinality.Many;

            var proc = new MappingProcessor(new OneToOneEntityProcessor());
            mappingSet = proc.CreateOneToOneMapping(entities);
        }
        public void SetUp()
        {
            entities = new EntitySetImpl();

            entityParent = new EntityImpl("EntityParent");
            entityParent.AddProperty(new PropertyImpl("PrimaryKey") { Type = "int", IsKeyProperty = true });

            entityChild = new EntityImpl("EntityChild");
            entityParent.AddChild(entityChild);
            entityChild.CopyPropertyFromParent(entityParent.ConcreteProperties[0]);
            entityChild.AddProperty(new PropertyImpl("ActualProperty"){ Type = "string" });

            entities.AddEntity(entityParent);
            entities.AddEntity(entityChild);

            var proc = new MappingProcessor(new OneToOneEntityProcessor());
            mappingSet = proc.CreateOneToOneMapping(entities);
        }
        public void SetUp()
        {
            entities = new EntitySetImpl();

            personEntity = new EntityImpl("Person");
            personEntity.AddProperty(new PropertyImpl("ID") { Type = "int", IsKeyProperty = true });
            personEntity.AddProperty(new PropertyImpl("Name") { Type = "string", ValidationOptions = new ValidationOptions {MaximumLength = 50} });
            personEntity.AddProperty(new PropertyImpl("Salary") { Type = "int" });

            managerEntity = new EntityImpl("Manager");
            managerEntity.Parent = personEntity;

            entities.AddEntity(personEntity);
            entities.AddEntity(managerEntity);

            reference = managerEntity.CreateReferenceTo(personEntity);
            reference.End1Enabled = true; reference.End2Enabled = true;
            reference.End1Name = "Subordinates"; reference.End2Name = "Manager";
            reference.Cardinality1 = Cardinality.Many; reference.Cardinality2 = Cardinality.One;
        }
 public void SetUp()
 {
     entity = new EntityImpl("Entity1");
     entity.AddProperty(new PropertyImpl("Property1") { Type = "System.Int32", IsKeyProperty = true });
     entity.AddProperty(new PropertyImpl("Property2") { Type = "bool" });
     entity.AddProperty(new PropertyImpl("Property3") { Type = "string", ValidationOptions = new ValidationOptions {MaximumLength = 50} });
 }