Figured out how to work around this issue for now...

private  Action<DynamicComponentPart<IDictionary>> mapping()
        {

            int i = 0;

            return c =>
             {
                 for (i = 0; i < 10; i++)  // number of categories
                 {


                         string propertyName = "category" + i
                         Expression<Func<IDictionary, object>>
expression = Expression.Lambda<Func<IDictionary, object>>
                              (
                             Expression.Call(Expression.New(typeof
(Hashtable)),
                             typeof(IDictionary).GetProperty
("Item").GetGetMethod(),
                             new Expression[] { Expression.Constant
(propertyName, typeof(string)) }),
                             new ParameterExpression[]
{ Expression.Parameter(typeof(IDictionary), "dictionary") }
                          );
                         c.Map(expression, propertyName);
                     }
                 }
             };
        }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to