Refactoring ExpressionHelpers and querying to seperate the mapping used for our Database DTOs and Public Model.

Adding a MediaTypeMapper similar to the ContentTypeMapper, but type specific.
The PetaPoco IMapper implementation is removed as its no longer needed.
Updating a few unit tests, as the Where clause is now correctly formatted.
Adding unit tests for the new ExpressionHelper and MappingResolver classes.
This commit is contained in:
Morten Christensen
2012-12-29 17:34:42 -01:00
parent 3955f78966
commit 8999db6362
17 changed files with 790 additions and 253 deletions

View File

@@ -22,7 +22,7 @@ namespace Umbraco.Core.Persistence
public static Sql Where<T>(this Sql sql, Expression<Func<T, bool>> predicate)
{
var expresionist = new ExpressionHelper<T>();
var expresionist = new PocoToSqlExpressionHelper<T>();
string whereExpression = expresionist.Visit(predicate);
return sql.Where(whereExpression);