mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 05:23:33 +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">
|
<fieldset class="what">
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<label for="CommentText">@T("Comment")</label>
|
<label for="comment-text">@T("Comment")</label>
|
||||||
<textarea id="comment-text" rows="10" cols="30" name="comment-text"></textarea>
|
<textarea id="comment-text" rows="10" cols="30" name="CommentText"></textarea>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="submit" class="button" value="@T("Submit Comment")" />
|
<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);
|
||||||
IEnumerable<T> Fetch(Expression<Func<T, bool>> predicate, Action<Orderable<T>> order);
|
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);
|
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) {
|
int count) {
|
||||||
return Fetch(predicate, order, skip, count).ToReadOnlyCollection();
|
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
|
#endregion
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user