mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -51,8 +51,8 @@ using (Html.BeginForm("Create", "Comment", new { area = "Orchard.Comments" }, Fo
|
||||
<fieldset class="what">
|
||||
<ol>
|
||||
<li>
|
||||
<label for="CommentText">@T("Comment")</label>
|
||||
<textarea id="comment-text" rows="10" cols="30" name="comment-text"></textarea>
|
||||
<label for="comment-text">@T("Comment")</label>
|
||||
<textarea id="comment-text" rows="10" cols="30" name="CommentText"></textarea>
|
||||
</li>
|
||||
<li>
|
||||
<input type="submit" class="button" value="@T("Submit Comment")" />
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user