From 03aa7fd06bd083ff8b0fd9dc72b3b80013c67fd3 Mon Sep 17 00:00:00 2001 From: Shannon Deminick Date: Sat, 23 Feb 2013 22:11:38 +0600 Subject: [PATCH] Fixes umbraco content service --- src/UmbracoExamine/DataServices/PropertyAliasDto.cs | 10 ++++++++++ .../DataServices/UmbracoContentService.cs | 4 ++-- src/UmbracoExamine/UmbracoExamine.csproj | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/UmbracoExamine/DataServices/PropertyAliasDto.cs diff --git a/src/UmbracoExamine/DataServices/PropertyAliasDto.cs b/src/UmbracoExamine/DataServices/PropertyAliasDto.cs new file mode 100644 index 0000000000..84e63ccf5c --- /dev/null +++ b/src/UmbracoExamine/DataServices/PropertyAliasDto.cs @@ -0,0 +1,10 @@ +namespace UmbracoExamine.DataServices +{ + /// + /// A Dto object for returning property aliases from PetaPoco + /// + public class PropertyAliasDto + { + public string Alias { get; set; } + } +} \ No newline at end of file diff --git a/src/UmbracoExamine/DataServices/UmbracoContentService.cs b/src/UmbracoExamine/DataServices/UmbracoContentService.cs index 85adb5d206..d2025e1f83 100644 --- a/src/UmbracoExamine/DataServices/UmbracoContentService.cs +++ b/src/UmbracoExamine/DataServices/UmbracoContentService.cs @@ -122,8 +122,8 @@ namespace UmbracoExamine.DataServices { try { - var result = _applicationContext.DatabaseContext.Database.Fetch("select distinct alias from cmsPropertyType order by alias"); - return result.Select(r => r.alias.ToString()).Cast().ToList(); + var result = _applicationContext.DatabaseContext.Database.Fetch("select distinct alias from cmsPropertyType order by alias"); + return result.Select(r => r.Alias).ToList(); } catch (Exception ex) { diff --git a/src/UmbracoExamine/UmbracoExamine.csproj b/src/UmbracoExamine/UmbracoExamine.csproj index 429b6eee86..3a462c8efe 100644 --- a/src/UmbracoExamine/UmbracoExamine.csproj +++ b/src/UmbracoExamine/UmbracoExamine.csproj @@ -113,6 +113,7 @@ +