Example #1
0
 private void InstantiateObjects(ISession session)
 {
     this.contact                         = (Person)session.Instantiate(this.contact);
     this.subcontractor                   = (Organisation)session.Instantiate(this.subcontractor);
     this.subContractorRelationship       = (SubContractorRelationship)session.Instantiate(this.subContractorRelationship);
     this.organisationContactRelationship = (OrganisationContactRelationship)session.Instantiate(this.organisationContactRelationship);
 }
Example #2
0
        public SubContractorRelationshipTests()
        {
            this.subcontractor = this.InternalOrganisation.CreateSubContractor(this.Session.Faker());

            this.Session.Derive();
            this.Session.Commit();

            this.subContractorRelationship       = this.subcontractor.SubContractorRelationshipsWhereSubContractor.First();
            this.organisationContactRelationship = this.subcontractor.OrganisationContactRelationshipsWhereOrganisation.First();
            this.contact = this.organisationContactRelationship.Contact;
        }