I\'m working on an EF 5 Code-First solution and I am trying to update an existing entity with a modified one using the Repository pattern:
public void Up
Based on Zev's answer:
public List GetNavigationProperties(DbContext context) where T : class
{
var entityType = typeof(T);
var elementType = ((IObjectContextAdapter)context).ObjectContext.CreateObjectSet().EntitySet.ElementType;
return elementType.NavigationProperties.Select(property => entityType.GetProperty(property.Name)).ToList();
}