Can someone please help me understand how Umbraco saves data into a DB. Maybe the question is too generic but bear with me as I explain.
I am trying to get unpublished content that I would like to display in the backoffice. When I click "Send for approval" in the backoffice, I would like to know how I would query for this content in my SearchController.cs class. I found this approach (shoutout to JonDJones!):
but I don't really understand the whole query. I have been searching my DB in SQL Server Management Studio to trying to figure out which tables are updated when I click the "Send for approval" button but I haven't been successful yet. So my question is, how do I check/know which tables are updated when I click this button (or any other button in general)?
I ended up injecting the content type service (IContentTypeService) and using that to get all the content types. Looping through the list, I got the content type alias of each item and used the aliases to get the all content (published/unpublished). Here are the code snippets:
Get all content types:
var allContentType = _contentTypeService.GetAll();
And then get the alias (and use it):
var contentList = new List<ISearchResults>();
foreach (var contentType in allContentType)
{
orderedExamineQuery = searcher.CreateQuery(IndexTypes.Content).NodeTypeAlias(contentType.Alias).OrderBy(new SortableField[] { new SortableField(DocumentTypeConstants.PropertyAlias.PostDate) })
.Execute();
contentList.Add(orderedExamineQuery);
}
Getting all unpublished content
Hi.
Can someone please help me understand how Umbraco saves data into a DB. Maybe the question is too generic but bear with me as I explain.
I am trying to get unpublished content that I would like to display in the backoffice. When I click "Send for approval" in the backoffice, I would like to know how I would query for this content in my SearchController.cs class. I found this approach (shoutout to JonDJones!):
but I don't really understand the whole query. I have been searching my DB in SQL Server Management Studio to trying to figure out which tables are updated when I click the "Send for approval" button but I haven't been successful yet. So my question is, how do I check/know which tables are updated when I click this button (or any other button in general)?
Thank you.
I ended up injecting the content type service (IContentTypeService) and using that to get all the content types. Looping through the list, I got the content type alias of each item and used the aliases to get the all content (published/unpublished). Here are the code snippets:
Get all content types:
And then get the alias (and use it):
is working on a reply...