/// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> protected virtual TypeScaffoldingInfo GetTypeScaffoldingInfo([NotNull] DatabaseColumn column) { if (column.StoreType == null) { return(null); } var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping( #pragma warning disable CS0618 // Type or member is obsolete column.GetUnderlyingStoreType() ?? column.StoreType, #pragma warning restore CS0618 // Type or member is obsolete column.IsKeyOrIndex(), column.IsRowVersion()); if (typeScaffoldingInfo == null) { return(null); } #pragma warning disable CS0618 // Type or member is obsolete return(column.GetUnderlyingStoreType() != null #pragma warning restore CS0618 // Type or member is obsolete ? new TypeScaffoldingInfo( typeScaffoldingInfo.ClrType, inferred: false, scaffoldUnicode: typeScaffoldingInfo.ScaffoldUnicode, scaffoldMaxLength: typeScaffoldingInfo.ScaffoldMaxLength, scaffoldFixedLength: typeScaffoldingInfo.ScaffoldFixedLength) : typeScaffoldingInfo); }
/// <summary> /// This API supports the Entity Framework Core infrastructure and is not intended to be used /// directly from your code. This API may change or be removed in future releases. /// </summary> protected virtual TypeScaffoldingInfo GetTypeScaffoldingInfo([NotNull] DatabaseColumn column) { if (column.StoreType == null) { return(null); } var typeScaffoldingInfo = _scaffoldingTypeMapper.FindMapping( column.GetUnderlyingStoreType() ?? column.StoreType, column.IsKeyOrIndex(), column.IsRowVersion()); if (typeScaffoldingInfo == null) { return(null); } return(column.GetUnderlyingStoreType() != null ? new TypeScaffoldingInfo( typeScaffoldingInfo.ClrType, inferred: false, scaffoldUnicode: typeScaffoldingInfo.ScaffoldUnicode, scaffoldMaxLength: typeScaffoldingInfo.ScaffoldMaxLength, scaffoldFixedLength: typeScaffoldingInfo.ScaffoldFixedLength) : typeScaffoldingInfo); }