public ResponsibleLegalPerson(Organisation organisation) {
            if (organisation == null) {
                throw new ArgumentNullException("organisation");
            }

            this.organisation = organisation;
        }
示例#2
0
        public void TheTest() {
            using (ISession session = OpenSession()) {
                var organisation = new Organisation();
                session.SaveOrUpdate(organisation);
                session.Flush();

                organisation.TradingNames.Add(new TradingName(organisation)
                                              {Name = "Trading Name", StartDate = DateTime.Today});
                
                session.SaveOrUpdate(organisation);

                //this line below fails 
                //AbstractBatcher:0 - Could not execute command: UPDATE tblTrnOrganisation SET  WHERE OrganisationId = @p0 AND RVersion = @p1
                //System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'WHERE'.
                session.Flush();

                session.Delete(organisation);
                session.Flush();
            }
        }
示例#3
0
 public TradingName(Organisation organisation)  {
     if (organisation == null) {
         throw new ArgumentNullException("organisation");
     }
     this.organisation = organisation;
 }