public string ToClrType(OrmEntityProperty prop) { return(_clrCatalog.TryGetDataTypeCSharp(prop)); }
public string ToClrType(OrmEntityProperty prop) { return _clrCatalog.TryGetDataTypeCSharp(prop); }
private string GenerateReferencePropertyName(OrmEntity parentEntity, OrmEntity childEntity, OrmEntityProperty childProperty) { string propertyName = childProperty.PropertyName; if (propertyName.EndsWith("ID", StringComparison.InvariantCultureIgnoreCase)) { propertyName = propertyName.Substring(0, propertyName.Length - 2).Trim(); } else if (propertyName.EndsWith("CODE", StringComparison.InvariantCultureIgnoreCase)) { propertyName = propertyName.Substring(0, propertyName.Length - 4).Trim(); } else { propertyName = parentEntity.Name; } if (StringUtils.CaseInsensitiveEquals(propertyName, parentEntity.Name)) { propertyName = parentEntity.Name; } return _entityNameCreator.CreateName(childEntity, typeof (OrmEntityProperty), propertyName); }