Using Entity Framework 5, database first.
Is it possible (at run time) to get the data type of the database column that an entity\'s property represents? The .net t
Use reflection on the entity to get the property info.
foreach (DbEntityEntry entity in entities) { foreach (string propertyName in entity.CurrentValues.PropertyNames) { var propertyInfo = entity.Entity.GetType().GetProperty(propertyName); var propertyType = propertyInfo.PropertyType; } }