Esempio n. 1
0
 /// <summary>
 /// Deletes all the items in the collection
 /// </summary>
 /// <param name="storage">Storage to use</param>
 /// <param name="items">Items to delete</param>
 public static void DeleteCollection(this ISessionFactory storage, IEnumerable items)
 {
     storage.AutoCommit(s => items.ForEach <object>(s.Delete));
 }
Esempio n. 2
0
 /// <summary>
 /// Deletes the item specified
 /// </summary>
 /// <param name="storage">Storage to use</param>
 /// <param name="target">Instance to delete</param>
 public static void Delete(this ISessionFactory storage, object target)
 {
     storage.AutoCommit(s => s.Delete(target));
 }
Esempio n. 3
0
 /// <summary>
 /// Saves or updates the object using AutoCommit
 /// </summary>
 /// <param name="storage">Storage to use</param>
 /// <param name="target">Target to save</param>
 public static void SaveOrUpdate(this ISessionFactory storage, object target)
 {
     storage.AutoCommit(s => s.SaveOrUpdate(target));
 }