Adding more tests to cover the ContentService and refactoring.

This commit is contained in:
sitereactor
2012-10-31 15:15:02 -01:00
parent b86bfdd87b
commit 4e2bcee35b
10 changed files with 322 additions and 45 deletions

View File

@@ -479,6 +479,9 @@ namespace Umbraco.Core.Persistence.Querying
if (fieldType == typeof(decimal))
return ((decimal)value).ToString(CultureInfo.InvariantCulture);
if(fieldType == typeof(DateTime))
return "'" + EscapeParam(((DateTime)value).ToString(CultureInfo.InvariantCulture)) + "'";
return ShouldQuoteValue(fieldType)
? "'" + EscapeParam(value) + "'"
: value.ToString();