I have added a property ("CustomProperty") to an EntityObject via a partial class definition. I want the property to be populated via a matching column from ExecuteStoreQuery. For example:
ExecuteStoreQuery<MyTable>("Select *, CustomProperty from MyTable")
CustomProperty is ignored if MyTable is an EntityObject. If MyTable is a POCO, it works.
According to the MSDN documentation it should work:
(http://msdn.microsoft.com/en-us/library/ee358758.aspx)
"Each property of the type:
- Must have a setter.
- Must correspond to a primitive type in CSDL.
- Must correspond to a column name in the resulting DbDataReader (the provider implementation determines whether a column has the same name as the property). If the name of the type's property does not match a field of the
DbDataReader, the Entity Framework materializes the default value of the property if it is defined in the conceptutal model."
It seems that if TElement is an EntityObject the behaviour is different. Any ideas?