Skip to content

Commit ce9b650

Browse files
committed
For bind vars don't require that it is a table mapped object.
1 parent b799ecb commit ce9b650

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

SQLitePCL.pretty.Orm/Statement.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ public static void BindProperties<T>(this IStatement This, T obj)
2727
Contract.Requires(This != null);
2828
Contract.Requires(obj != null);
2929

30-
var columns = TableMapping.Get<T>().Columns;
31-
foreach (var column in columns)
30+
var bindVars = typeof(T).GetPublicInstanceProperties();
31+
foreach (var bindVar in bindVars)
3232
{
33-
var key = ":" + column.Key;
33+
var key = ":" + bindVar.Name;
3434
if (This.BindParameters.ContainsKey(key))
3535
{
36-
var value = column.Value.Property.GetValue(obj);
36+
var value = bindVar.GetValue(obj);
3737
This.BindParameters[key].Bind(value);
3838
}
3939
}

0 commit comments

Comments
 (0)