This project has moved and is read-only. For the latest updates, please go here.
1
Vote

ComplexType properties with underscores

description

There is an issue with discovering Properties of ComplexType having underscores in their name (which is not a recommended practice in Code First but which can be common in database structures).

There is a simple fix:

In MapperBase.cs:MapProperty(EntityMap entityMap, EdmProperty edmProperty, ref int i, ref string prefix)

Change :
propName = columnName.Replace('_', '.');
by
propName = columnName.Replace(prefix + "_", prefix + ".");

comments