/// <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)); }
/// <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)); }
/// <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)); }