Improved the handling of DynamicNull when using OrderBy

This commit is contained in:
agrath
2011-08-29 11:19:34 -12:00
parent 9925c95d2c
commit 265fc0b3ca
2 changed files with 72 additions and 51 deletions

View File

@@ -258,6 +258,7 @@ namespace umbraco.MacroEngines
{
var types = from i in query
group i by i.GetType() into g
where g.Key != typeof(DynamicNull)
orderby g.Count() descending
select new { g, Instances = g.Count() };
var dominantType = types.First().g.Key;
@@ -314,6 +315,7 @@ namespace umbraco.MacroEngines
{
var types = from i in query
group i by i.GetType() into g
where g.Key != typeof(DynamicNull)
orderby g.Count() descending
select new { g, Instances = g.Count() };
var dominantType = types.First().g.Key;