public static List <NavigationProperty> GetNavigationProperties(this Edmx edmx, string entityName) { if (edmx.GetEntityType(entityName).NavigationProperties.Count > 0) { return(edmx.GetEntityType(entityName).NavigationProperties.ToList()); } return(new List <NavigationProperty>()); }
public static EntityKeyElement GetEntityKey(this Edmx edmx, string entityName) { return(edmx.GetEntityType(entityName).Key); }