Added QueryModel

This commit is contained in:
Rusty Swayne
2014-06-08 10:20:34 -07:00
parent 1aa162e255
commit 2dc38a29cf
3 changed files with 24 additions and 0 deletions

View 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; }
}
}

View File

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

View File

@@ -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" />