In NObject O/R Mapping persistence layer, when committing transaction, the state of object related with transaction will change to committing. Transaction committing sample: Commit
|
om.BeginTransaction(); Region region = new Region(om); region.RegionID = -999; region.RegionDescription =
"-999"; Console.WriteLine(region.RegionDescription
== "-999"); region.Save(); Console.WriteLine(region.RegionDescription
== "-999"); om.Commit(); Console.WriteLine(region.RegionDescription
== "-999"); Region region2 = Region.GetByRegionID(om, -999); Console.WriteLine(region2 != null); |
|
--output result-- |
|
True True True True |
Related Topics