Пример #1
0
        public override void Init()
        {
            base.Init();

            this.employee = new PersonBuilder(this.DatabaseSession).WithLastName("slave").Build();
            this.internalOrganisation = new InternalOrganisations(this.DatabaseSession).FindBy(InternalOrganisations.Meta.Name, "internalOrganisation");

            this.employment = new EmploymentBuilder(this.DatabaseSession)
                .WithEmployee(this.employee)
                .WithEmployer(this.internalOrganisation)
                .WithFromDate(DateTime.UtcNow)
                .Build();

            this.DatabaseSession.Derive(true);
            this.DatabaseSession.Commit();
        }
 private void InstantiateObjects(ISession session)
 {
     this.contact = (Person)session.Instantiate(this.contact);
     this.organisationContactRelationship = (OrganisationContactRelationship)session.Instantiate(this.organisationContactRelationship);
 }
        public override void Init()
        {
            base.Init();

            this.contact = new PersonBuilder(this.DatabaseSession).WithLastName("organisationContact").Build();

            this.organisationContactRelationship = new OrganisationContactRelationshipBuilder(this.DatabaseSession)
                .WithContact(this.contact)
                .WithOrganisation(new Organisations(this.DatabaseSession).FindBy(Organisations.Meta.Name, "customer"))
                .WithFromDate(DateTime.UtcNow)
                .Build();

            this.DatabaseSession.Derive(true);
            this.DatabaseSession.Commit();
        }
Пример #4
0
 private void InstantiateObjects(ISession session)
 {
     this.contact = (Person)session.Instantiate(this.contact);
     this.supplier = (Organisation)session.Instantiate(this.supplier);
     this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
     this.supplierRelationship = (SupplierRelationship)session.Instantiate(this.supplierRelationship);
 }
Пример #5
0
        public override void Init()
        {
            base.Init();

            this.contact = new PersonBuilder(this.DatabaseSession).WithLastName("contact").Build();
            this.supplier = new OrganisationBuilder(this.DatabaseSession)
                .WithName("supplier")
                .WithLocale(new Locales(this.DatabaseSession).EnglishGreatBritain)
                .Build();
            this.internalOrganisation = new InternalOrganisations(this.DatabaseSession).FindBy(InternalOrganisations.Meta.Name, "internalOrganisation");

            new OrganisationContactRelationshipBuilder(this.DatabaseSession)
                .WithOrganisation(this.supplier)
                .WithContact(this.contact)
                .WithFromDate(DateTime.UtcNow)
                .Build();

            this.supplierRelationship = new SupplierRelationshipBuilder(this.DatabaseSession)
                .WithSupplier(this.supplier)
                .WithInternalOrganisation(this.internalOrganisation)
                .WithFromDate(DateTime.UtcNow)
                .Build();

            this.DatabaseSession.Derive(true);
            this.DatabaseSession.Commit();
        }
Пример #6
0
 private void InstantiateObjects(ISession session)
 {
     this.employee = (Person)session.Instantiate(this.employee);
     this.internalOrganisation = (InternalOrganisation)session.Instantiate(this.internalOrganisation);
     this.employment = (Employment)session.Instantiate(this.employment);
 }