Added QueryModel
This commit is contained in:
13
src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs
Normal file
13
src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Umbraco.Web.Editors
|
||||
{
|
||||
public class QueryModel : IQueryModel
|
||||
{
|
||||
public string ContentTypeAlias { get; set; }
|
||||
public int Id { get; set; }
|
||||
public IEnumerable<IQueryCondition> Wheres { get; set; }
|
||||
public string SortDirection { get; set; }
|
||||
public ISortExpression SortExpression { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,16 @@ namespace Umbraco.Web.Editors
|
||||
new OperathorTerm("less than or equal to", Operathor.LessThanEqualTo, new [] {"int"})
|
||||
};
|
||||
|
||||
|
||||
public IQueryResultModel GetTemplateQuery2()
|
||||
{
|
||||
return GetTemplateQuery(new QueryModel()
|
||||
{
|
||||
ContentTypeAlias = "umbTextPage",
|
||||
Id = 1068
|
||||
});
|
||||
}
|
||||
|
||||
public IQueryResultModel GetTemplateQuery(IQueryModel model)
|
||||
{
|
||||
var umbraco = new UmbracoHelper(UmbracoContext);
|
||||
|
||||
@@ -320,6 +320,7 @@
|
||||
<Compile Include="Editors\TemplateQuery\Operathor.cs" />
|
||||
<Compile Include="Editors\TemplateQuery\OperathorTerm.cs" />
|
||||
<Compile Include="Editors\TemplateQuery\QueryCondition.cs" />
|
||||
<Compile Include="Editors\TemplateQuery\QueryModel.cs" />
|
||||
<Compile Include="Editors\TemplateQuery\QueryResultModel.cs" />
|
||||
<Compile Include="Editors\TemplateQuery\TemplateQueryController.cs" />
|
||||
<Compile Include="Models\ContentEditing\ContentBaseItemSave.cs" />
|
||||
|
||||
Reference in New Issue
Block a user