From 2dc38a29cf4215d2f1748e6311798146b2f37b0b Mon Sep 17 00:00:00 2001 From: Rusty Swayne Date: Sun, 8 Jun 2014 10:20:34 -0700 Subject: [PATCH] Added QueryModel --- src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs | 13 +++++++++++++ .../TemplateQuery/TemplateQueryController.cs | 10 ++++++++++ src/Umbraco.Web/Umbraco.Web.csproj | 1 + 3 files changed, 24 insertions(+) create mode 100644 src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs diff --git a/src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs b/src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs new file mode 100644 index 0000000000..ff1694ec9e --- /dev/null +++ b/src/Umbraco.Web/Editors/TemplateQuery/QueryModel.cs @@ -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 Wheres { get; set; } + public string SortDirection { get; set; } + public ISortExpression SortExpression { get; set; } + } +} \ No newline at end of file diff --git a/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs b/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs index 3e8ded5971..2d9baf77d2 100644 --- a/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs +++ b/src/Umbraco.Web/Editors/TemplateQuery/TemplateQueryController.cs @@ -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); diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 510aada3a8..efbf628067 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -320,6 +320,7 @@ +