Skip to content

Commit

Permalink
Merge pull request #134 from pvictorlv/master
Browse files Browse the repository at this point in the history
Update ExpressionHelper.cs
  • Loading branch information
Paulo Victor Lund authored Feb 28, 2020
2 parents 41dc525 + 13129ad commit 652de37
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
Expand Down Expand Up @@ -137,7 +138,7 @@ public static BinaryExpression GetBinaryExpression(Expression expression)

public static Func<PropertyInfo, bool> GetPrimitivePropertiesPredicate()
{
return p => p.CanWrite && (p.PropertyType.IsValueType || p.PropertyType == typeof(string) || p.PropertyType == typeof(byte[]));
return p => p.CanWrite && (p.PropertyType.IsValueType || p.GetCustomAttributes<ColumnAttribute>().Any() || p.PropertyType == typeof(string) || p.PropertyType == typeof(byte[]));
}

public static object GetValuesFromStringMethod(MethodCallExpression callExpr)
Expand Down

0 comments on commit 652de37

Please sign in to comment.