- No need for IRepository<T>::void Transaction(Action action); to be in 0.8. We don't want it to be used.

--HG--
branch : dev
This commit is contained in:
Suha Can
2010-10-21 13:50:18 -07:00
parent 5887ade4aa
commit dfb07bb95c
2 changed files with 0 additions and 19 deletions

View File

@@ -20,8 +20,5 @@ namespace Orchard.Data {
IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate);
IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate, Action<Orderable<T>> order);
IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate, Action<Orderable<T>> order, int skip, int count);
[Obsolete]
void Transaction(Action action);
}
}

View File

@@ -80,22 +80,6 @@ namespace Orchard.Data {
int count) {
return Fetch(predicate, order, skip, count).ToReadOnlyCollection();
}
void IRepository<T>.Transaction(Action action) {
Transaction(action);
}
public virtual void Transaction(Action action) {
using (var transaction = Session.BeginTransaction()) {
try {
action();
transaction.Commit();
}
catch {
transaction.Rollback();
throw;
}
}
}
#endregion