Castle.ActiveRecord.ActiveRecordBase.SaveAndFlush C# (CSharp) Метод

SaveAndFlush() публичный Метод

Saves the instance information to the database. May Create or Update the instance depending on whether it has a valid ID.
Even within a SessionScope the operation is going to be flushed immediately. This might have side effects such as flushing (persisting) others operations that were on hold.
public SaveAndFlush ( ) : void
Результат void
		public virtual void SaveAndFlush()
		{
			SaveAndFlush(this);
		}

Same methods

ActiveRecordBase::SaveAndFlush ( object instance ) : void

Usage Example

Пример #1
0
 /// <summary>
 /// Saves the instance to the database and flushes the session. If the primary key is unitialized
 /// it creates the instance on the database. Otherwise it updates it.
 /// <para>
 /// If the primary key is assigned, then you must invoke <see cref="Create(object)"/>
 /// or <see cref="Update(object)"/> instead.
 /// </para>
 /// </summary>
 /// <param name="instance">The ActiveRecord instance to be saved</param>
 public static void SaveAndFlush(object instance)
 {
     ActiveRecordBase.SaveAndFlush(instance);
 }