mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-28 17:32:44 +08:00
Adding "Flush" method to content manager
This is needed when you need to make queries that rely on state changed inside the session UOW. --HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045743
This commit is contained in:
@@ -362,6 +362,10 @@ namespace Orchard.ContentManagement {
|
||||
return query.ForPart<ContentItem>();
|
||||
}
|
||||
|
||||
public void Flush() {
|
||||
_contentItemRepository.Flush();
|
||||
}
|
||||
|
||||
private ContentTypeRecord AcquireContentTypeRecord(string contentType) {
|
||||
var contentTypeRecord = _contentTypeRepository.Get(x => x.Name == contentType);
|
||||
if (contentTypeRecord == null) {
|
||||
|
||||
@@ -18,6 +18,7 @@ namespace Orchard.ContentManagement {
|
||||
void Unpublish(ContentItem contentItem);
|
||||
void Remove(ContentItem contentItem);
|
||||
|
||||
void Flush();
|
||||
IContentQuery<ContentItem> Query();
|
||||
|
||||
ContentItemMetadata GetItemMetadata(IContent contentItem);
|
||||
|
||||
Reference in New Issue
Block a user