I have been trying to implement user defined properties on a test project.
I am using a TypeDescriptionProvider solution with code first where my base entity object has a dictionary that acts as a property bag.
The problem I have is that I have to map these properties in the EntityTypeConfiguration and it only accepts actual .Properties off the main class type. I have attempted to add some extension methods that build up an expression to access the properties through the property bag
Item["propertyName"]
but while it compiles it explodes when it tries to perform the mapping (has to have a . property).
I am looking for a way around this limitation. I am not sure at this point if it is a limitation in my understanding of expression trees or a limit in the mapping capabilities of EF.
If anyone has some insight I would appreciate it.
thank.
I am using a TypeDescriptionProvider solution with code first where my base entity object has a dictionary that acts as a property bag.
The problem I have is that I have to map these properties in the EntityTypeConfiguration and it only accepts actual .Properties off the main class type. I have attempted to add some extension methods that build up an expression to access the properties through the property bag
Item["propertyName"]
but while it compiles it explodes when it tries to perform the mapping (has to have a . property).
I am looking for a way around this limitation. I am not sure at this point if it is a limitation in my understanding of expression trees or a limit in the mapping capabilities of EF.
If anyone has some insight I would appreciate it.
thank.