/// <summary> /// Converts surrogate id property names to their publicly visible counterparts. /// </summary> /// <param name="entityProperty">The property to be evaluated.</param> /// <returns>The property name appropriate for use on the model abstraction.</returns> public static string GetModelsInterfacePropertyName(this EntityProperty entityProperty) { if (entityProperty.IsLookup) { return(entityProperty.PropertyName.TrimSuffix("Id")); } if (UniqueIdSpecification.IsCoreUSI(entityProperty.PropertyName)) { return(UniqueIdSpecification.GetUniqueIdPropertyName(entityProperty.PropertyName)); } return(entityProperty.PropertyName); }