Small improvements
This commit is contained in:
@@ -123,10 +123,10 @@ namespace DynamORM.Mapper
|
||||
|
||||
private Func<object, object> CreateGetter(PropertyInfo property)
|
||||
{
|
||||
if (!property.CanRead)
|
||||
if (property == null || !property.CanRead)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
|
||||
return Expression.Lambda<Func<object, object>>(
|
||||
Expression.Convert(
|
||||
@@ -141,8 +141,8 @@ namespace DynamORM.Mapper
|
||||
if (!property.CanWrite)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
ParameterExpression valueParm = Expression.Parameter(typeof(object), "value");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
var valueParm = Expression.Parameter(typeof(object), "value");
|
||||
|
||||
return Expression.Lambda<Action<object, object>>(
|
||||
Expression.Assign(
|
||||
|
||||
Reference in New Issue
Block a user