public void LockNewlyCreatedEntity() { var track = new AudioTrack() { Name = "SomeTrack" }; using (Session.DisableSaveChanges()) track.Lock(LockMode.Exclusive, LockBehavior.ThrowIfLocked); }
public void LockNewlyCreatedEntity() { Require.ProviderIsNot(StorageProvider.MySql); var track = new AudioTrack() { Name = "SomeTrack" }; using (Session.DisableSaveChanges()) { track.Lock(LockMode.Exclusive, LockBehavior.ThrowIfLocked); } }