Small improvements

This commit is contained in:
grzegorz.russek committed 2025-01-24 16:03:30 +01:00
1 parent 86c22cfe85
commit 81c4915d16
2 files changed
+9 -43

No files matched your search

+4 -4
View File
@@ -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(