protected internal static void DeleteAll(Type type, String where)
{
EnsureInitialized(type);
ISession session = holder.CreateSession(type);
try
{
session.Delete(String.Format("from {0} where {1}", type.Name, where));
session.Flush();
}
catch (ValidationException)
{
holder.FailSession(session);
throw;
}
catch (Exception ex)
{
holder.FailSession(session);
throw new ActiveRecordException("Could not perform DeleteAll for " + type.Name, ex);
}
finally
{
holder.ReleaseSession(session);
}
}