Maybe it is so easy you missed it. Just access the property! After you save the collection the facility object's property are set to their database values. There is nothing to do. They are already there. So you like
int jusAddedFacilityID = ??
can be changed to
int jusAddedFacilityID = facility.FacilityId
Actually you do not even need to save it first. Using the NHDAL (which you are) the property can be used on related objects even though it is not set to the real database value. Auto-numbers start at -1 and work backward in memory until they are saved then
they are reset to the database values. However in any case if you add a new related object and set its foreign key to the PK of the first object, the framework just knows how to handle it. An added benefit is that you can save multiple object types in one
database transaction. I have rewritten your code to do this.
//Create new facility collection, implicit subdomain is created
var facilityCollection = new FacilityCollection();
var facility = facilityCollection.NewItem();
facility.FacilityName = "T1111111111";
facility.FacilityType = "ZZ";
facility.Active = "T";
//Add new related object in same subdomain
var stuctureCollection = facilityCollection.SubDomain.GetCollection<StructureCollection>();
var structure = stuctureCollection.NewItem();
structure.FacilityID = facility.FacilityId; //Value is -1 in memory but this is OK
//Saving any collection saves the whole subdomain
//The FacilityId is now set to the database value after save!
System.Diagnostics.Debug.Assert(facility.FacilityId > 0, "Something is wrong");