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:
rpaquay
2010-01-20 20:29:49 +00:00
parent 6c6b67af2b
commit 4a5bfc2dfd
2 changed files with 5 additions and 0 deletions

View File

@@ -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) {

View File

@@ -18,6 +18,7 @@ namespace Orchard.ContentManagement {
void Unpublish(ContentItem contentItem);
void Remove(ContentItem contentItem);
void Flush();
IContentQuery<ContentItem> Query();
ContentItemMetadata GetItemMetadata(IContent contentItem);