private static void Subclass() { using (var session = NHibernateHelper.OpenSession()) { using (var transaction = session.BeginTransaction()) { var parentA = new ParentA() { Name = "Chris" }; var childA = new ChildA() { Name = "Mary", AnotherProperty = "Likes dogs" }; var parentB = new ParentB() { Name = "Chris" }; var childB = new ChildB() { Name = "Mary", AnotherProperty = "Likes dogs" }; var parentC = new ParentC() { Name = "Chris" }; var childC = new ChildC() { Name = "Mary", AnotherProperty = "Likes dogs" }; session.Save(parentA); session.Save(parentB); session.Save(parentC); session.Save(childA); session.Save(childB); session.Save(childC); transaction.Commit(); Console.WriteLine("Done!"); } } }
public void SerializeParentWithExpectedChildShouldWork() { var obj = new ParentC(); Serializer.Serialize(Stream.Null, obj); }
public void SerializeParentWithExpectedChildShouldWork() { var obj = new ParentC(); Serializer.Serialize(Stream.Null, obj); }