Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some docs issues #26755

Merged
merged 1 commit into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,7 @@ public virtual DbFunctionBuilder HasStoreType(string? storeType)
/// expression representing the desired translation.
/// </summary>
/// <remarks>
/// <para>
/// See https://go.microsoft.com/fwlink/?linkid=852477 for more information.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-database-functions">Database functions</see> for more information.
/// </para>
/// See <see href="https://aka.ms/efcore-docs-database-functions">Database functions</see> for more information.
/// </remarks>
/// <param name="translation">The translation to use.</param>
/// <returns>The same builder instance so that multiple configuration calls can be chained.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public interface IConventionDbFunctionBuilder : IConventionAnnotatableBuilder
/// expression representing the desired translation.
/// </summary>
/// <remarks>
/// See https://go.microsoft.com/fwlink/?linkid=852477 for more information.
/// See <see href="https://aka.ms/efcore-docs-database-functions">Database functions</see> for more information.
/// </remarks>
/// <param name="translation">The translation to use.</param>
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1136,16 +1136,16 @@ private void Initialize(
{
throw new InvalidOperationException(
RelationalStrings.DefaultValueUnspecified(
column.Name,
(column.Table.Name, column.Table.Schema).FormatTable()));
(column.Table.Name, column.Table.Schema).FormatTable(),
column.Name));
}

if (column.DefaultValueSql?.Length == 0)
{
throw new InvalidOperationException(
RelationalStrings.DefaultValueSqlUnspecified(
column.Name,
(column.Table.Name, column.Table.Schema).FormatTable()));
(column.Table.Name, column.Table.Schema).FormatTable(),
column.Name));
}

if (column.ComputedColumnSql?.Length == 0)
Expand Down
9 changes: 5 additions & 4 deletions src/EFCore.Relational/Query/IMethodCallTranslatorPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ namespace Microsoft.EntityFrameworkCore.Query
/// Represents plugin for <see cref="IMethodCallTranslator" />.
/// </summary>
/// <remarks>
/// The service lifetime is <see cref="ServiceLifetime.Singleton" /> and multiple registrations
/// are allowed. This means a single instance of each service is used by many <see cref="DbContext" />
/// instances. The implementation must be thread-safe.
/// This service cannot depend on services registered as <see cref="ServiceLifetime.Scoped" />.
/// The service lifetime is <see cref="ServiceLifetime.Scoped" /> and multiple registrations
/// are allowed. This means that each <see cref="DbContext" /> instance will use its own
/// set of instances of this service.
/// The implementations may depend on other services registered with any lifetime.
/// The implementations do not need to be thread-safe.
/// </remarks>
public interface IMethodCallTranslatorPlugin
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions
/// <remarks>
/// This is a simple wrapper around a <see cref="SqlExpression" /> and an alias.
/// Instances of this type cannot be constructed by application or database provider code. If this is a problem for your
/// application or provider, then please file an issue at https://github.com/dotnet/efcore.
/// application or provider, then please file an issue at
/// <see href="https://github.com/dotnet/efcore">github.com/dotnet/efcore</see>.
/// </remarks>
public sealed class ProjectionExpression : Expression, IPrintableExpression
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions
/// </summary>
/// <remarks>
/// This class is not publicly constructable. If this is a problem for your application or provider, then please file
/// an issue at https://github.com/dotnet/efcore.
/// an issue at <see href="https://github.com/dotnet/efcore">github.com/dotnet/efcore</see>.
/// </remarks>
// Class is sealed because there are no public/protected constructors. Can be unsealed if this is changed.
public sealed partial class SelectExpression : TableExpressionBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions
/// <remarks>
/// This is a simple wrapper around a <see cref="ParameterExpression" /> in the SQL tree.
/// Instances of this type cannot be constructed by application or database provider code. If this is a problem for your
/// application or provider, then please file an issue at https://github.com/dotnet/efcore.
/// application or provider, then please file an issue at
/// <see href="https://github.com/dotnet/efcore">github.com/dotnet/efcore</see>.
/// </remarks>
public sealed class SqlParameterExpression : SqlExpression
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.EntityFrameworkCore.Query.SqlExpressions
/// <remarks>
/// This is a simple wrapper around a table and schema name. Instances of this type cannot be constructed by
/// application or database provider code. If this is a problem for your application or provider, then please file
/// an issue at https://github.com/dotnet/efcore.
/// an issue at <see href="https://github.com/dotnet/efcore">github.com/dotnet/efcore</see>.
/// </remarks>
public sealed class TableExpression : TableExpressionBase, IClonableTableExpressionBase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,13 @@ public static bool CanSetValueGenerationStrategy(
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
/// <see href="https://aka.ms/efcore-docs-sqlserver">Accessing SQL Server and SQL Azure databases with EF Core</see>
/// for more information.
/// for more information. Also see
/// <see href="https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns">Sparse columns</see> for
/// general information on SQL Server sparse columns.
/// </remarks>
/// <param name="propertyBuilder">The builder for the property being configured.</param>
/// <param name="sparse">A value indicating whether the property's column is created as sparse.</param>
/// <returns>A builder to further configure the property.</returns>
/// <remarks> See https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns. </remarks>
public static PropertyBuilder IsSparse(this PropertyBuilder propertyBuilder, bool sparse = true)
{
propertyBuilder.Metadata.SetIsSparse(sparse);
Expand All @@ -407,12 +408,13 @@ public static PropertyBuilder IsSparse(this PropertyBuilder propertyBuilder, boo
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
/// <see href="https://aka.ms/efcore-docs-sqlserver">Accessing SQL Server and SQL Azure databases with EF Core</see>
/// for more information.
/// for more information. Also see
/// <see href="https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns">Sparse columns</see> for
/// general information on SQL Server sparse columns.
/// </remarks>
/// <param name="propertyBuilder">The builder for the property being configured.</param>
/// <param name="sparse">A value indicating whether the property's column is created as sparse.</param>
/// <returns>A builder to further configure the property.</returns>
/// <remarks> See https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns. </remarks>
public static PropertyBuilder<TProperty> IsSparse<TProperty>(
this PropertyBuilder<TProperty> propertyBuilder,
bool sparse = true)
Expand All @@ -424,13 +426,14 @@ public static PropertyBuilder<TProperty> IsSparse<TProperty>(
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
/// <see href="https://aka.ms/efcore-docs-sqlserver">Accessing SQL Server and SQL Azure databases with EF Core</see>
/// for more information.
/// for more information. Also see
/// <see href="https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns">Sparse columns</see> for
/// general information on SQL Server sparse columns.
/// </remarks>
/// <param name="propertyBuilder">The builder for the property being configured.</param>
/// <param name="sparse">A value indicating whether the property's column is created as sparse.</param>
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
/// <returns>The same builder instance if the configuration was applied, <see langword="null" /> otherwise.</returns>
/// <remarks> See https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns. </remarks>
public static IConventionPropertyBuilder? IsSparse(
this IConventionPropertyBuilder propertyBuilder,
bool? sparse,
Expand All @@ -452,7 +455,9 @@ public static PropertyBuilder<TProperty> IsSparse<TProperty>(
/// <remarks>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see>, and
/// <see href="https://aka.ms/efcore-docs-sqlserver">Accessing SQL Server and SQL Azure databases with EF Core</see>
/// for more information.
/// for more information. Also see
/// <see href="https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns">Sparse columns</see> for
/// general information on SQL Server sparse columns.
/// </remarks>
/// <param name="property">The builder for the property being configured.</param>
/// <param name="sparse">A value indicating whether the property's column is created as sparse.</param>
Expand All @@ -461,7 +466,6 @@ public static PropertyBuilder<TProperty> IsSparse<TProperty>(
/// <returns>
/// <see langword="true" /> if the property's column can be configured as sparse when targeting SQL Server.
/// </returns>
/// <remarks> See https://docs.microsoft.com/sql/relational-databases/tables/use-sparse-columns. </remarks>
public static bool CanSetIsSparse(
this IConventionPropertyBuilder property,
bool? sparse,
Expand Down
4 changes: 3 additions & 1 deletion src/EFCore/ChangeTracking/EntityEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public virtual object Entity
/// <remarks>
/// <para>
/// This method sets only the state of the single entity represented by this entry. It does
/// not change the state of other entities reachable from this one.
/// not change the state of other entities reachable from this one. However, this may cause cascading actions on other
/// entities when setting the state to <see cref="EntityState.Deleted" /> or <see cref="EntityState.Detached" />.
/// This can be changed by changing <see cref="ChangeTracker.CascadeDeleteTiming"/>.
/// </para>
/// <para>
/// When setting the state, the entity will always end up in the specified state. For example, if you
Expand Down
6 changes: 4 additions & 2 deletions src/EFCore/Diagnostics/CoreEventId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ private static EventId MakeModelValidationId(Id id)
/// <summary>
/// A foreign key property was created in shadow state because a conflicting property with the simple name for
/// this foreign key exists in the entity type, but is either not mapped, is already used for another relationship,
/// or is incompatible with the associated primary key type. See https://aka.ms/efcore-relationships for information
/// on mapping relationships in EF Core.
/// or is incompatible with the associated primary key type.
/// </summary>
/// <remarks>
/// <para>
Expand All @@ -485,6 +484,9 @@ private static EventId MakeModelValidationId(Id id)
/// <para>
/// This event uses the <see cref="UniquifiedPropertyEventData" /> payload when used with a <see cref="DiagnosticSource" />.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-modeling">Modeling entity types and relationships</see> for more information.
/// </para>
/// </remarks>
public static readonly EventId ShadowForeignKeyPropertyCreated = MakeModelValidationId(Id.ShadowForeignKeyPropertyCreated);

Expand Down
6 changes: 4 additions & 2 deletions src/EFCore/Metadata/Builders/PropertyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ public virtual PropertyBuilder ValueGeneratedOnUpdateSometimes()
/// </summary>
/// <remarks>
/// <para>
/// Backing fields are normally found by convention as described
/// here: http://go.microsoft.com/fwlink/?LinkId=723277.
/// Backing fields are normally found by convention.
/// This method is useful for setting backing fields explicitly in cases where the
/// correct field is not found by convention.
/// </para>
Expand All @@ -402,6 +401,9 @@ public virtual PropertyBuilder ValueGeneratedOnUpdateSometimes()
/// Properties are used for all other accesses. This can be changed by calling
/// <see cref="UsePropertyAccessMode" />.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-backing-fields">Backing fields</see> for more information.
/// </para>
/// </remarks>
/// <param name="fieldName">The field name.</param>
/// <returns>The same builder instance so that multiple configuration calls can be chained.</returns>
Expand Down
6 changes: 4 additions & 2 deletions src/EFCore/Metadata/Builders/PropertyBuilder`.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ public PropertyBuilder(IMutableProperty property)
/// </summary>
/// <remarks>
/// <para>
/// Backing fields are normally found by convention as described
/// here: http://go.microsoft.com/fwlink/?LinkId=723277.
/// Backing fields are normally found by convention.
/// This method is useful for setting backing fields explicitly in cases where the
/// correct field is not found by convention.
/// </para>
Expand All @@ -312,6 +311,9 @@ public PropertyBuilder(IMutableProperty property)
/// Properties are used for all other accesses. This can be changed by calling
/// <see cref="UsePropertyAccessMode" />.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-backing-fields">Backing fields</see> for more information.
/// </para>
/// </remarks>
/// <param name="fieldName">The field name.</param>
/// <returns>The same builder instance so that multiple configuration calls can be chained.</returns>
Expand Down
6 changes: 4 additions & 2 deletions src/EFCore/Metadata/IConventionPropertyBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ void SetField(FieldInfo? fieldInfo, bool fromDataAnnotation = false)
/// </summary>
/// <remarks>
/// <para>
/// Backing fields are normally found by convention as described
/// here: http://go.microsoft.com/fwlink/?LinkId=723277.
/// Backing fields are normally found by convention.
/// This method is useful for setting backing fields explicitly in cases where the
/// correct field is not found by convention.
/// </para>
Expand All @@ -77,6 +76,9 @@ void SetField(FieldInfo? fieldInfo, bool fromDataAnnotation = false)
/// Properties are used for all other accesses. This can be changed by calling
/// <see cref="SetPropertyAccessMode" />.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-backing-fields">Backing fields</see> for more information.
/// </para>
/// </remarks>
/// <param name="fieldName">The name of the field to use.</param>
/// <param name="fromDataAnnotation">Indicates whether the configuration was specified using a data annotation.</param>
Expand Down
6 changes: 4 additions & 2 deletions src/EFCore/Metadata/IMutablePropertyBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public interface IMutablePropertyBase : IReadOnlyPropertyBase, IMutableAnnotatab
/// </summary>
/// <remarks>
/// <para>
/// Backing fields are normally found by convention as described
/// here: http://go.microsoft.com/fwlink/?LinkId=723277.
/// Backing fields are normally found by convention.
/// This method is useful for setting backing fields explicitly in cases where the
/// correct field is not found by convention.
/// </para>
Expand All @@ -46,6 +45,9 @@ public interface IMutablePropertyBase : IReadOnlyPropertyBase, IMutableAnnotatab
/// Properties are used for all other accesses. This can be changed by calling
/// <see cref="SetPropertyAccessMode" />.
/// </para>
/// <para>
/// See <see href="https://aka.ms/efcore-docs-backing-fields">Backing fields</see> for more information.
/// </para>
/// </remarks>
/// <param name="fieldName">The name of the field to use.</param>
void SetField(string? fieldName);
Expand Down
3 changes: 2 additions & 1 deletion src/EFCore/Storage/ValueConversion/ValueConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ protected ValueConverter(
/// </para>
/// <para>
/// Warning: this is currently an internal API since converting nulls to and from the database can lead to broken
/// queries and other issues. See https://github.com/dotnet/efcore/issues/26230 for more information.
/// queries and other issues. See <see href="https://github.com/dotnet/efcore/issues/26230">GitHub issue #26230</see>
/// for more information.
/// </para>
/// </summary>
/// <remarks>
Expand Down
3 changes: 2 additions & 1 deletion src/EFCore/Storage/ValueConversion/ValueConverter`.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public ValueConverter(
/// </para>
/// <para>
/// Warning: this is currently an internal API since converting nulls to and from the database can lead to broken
/// queries and other issues. See https://github.com/dotnet/efcore/issues/26230 for more information.
/// queries and other issues. See <see href="https://github.com/dotnet/efcore/issues/26230">GitHub issue #26230</see>
/// for more information.
/// </para>
/// </summary>
/// <remarks>
Expand Down
5 changes: 3 additions & 2 deletions src/EFCore/ValueGeneration/SequentialGuidValueGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ namespace Microsoft.EntityFrameworkCore.ValueGeneration
/// </summary>
/// <remarks>
/// <para>
/// See https://docs.microsoft.com/sql/t-sql/functions/newsequentialid-transact-sql.
/// Although this generator achieves the same goals as SQL Server's NEWSEQUENTIALID, the algorithm used
/// to generate the GUIDs is different.
/// to generate the GUIDs is different. See
/// <see href="https://docs.microsoft.com/sql/t-sql/functions/newsequentialid-transact-sql">NEWSEQUENTIALID</see>
/// for more information on the advantages of sequential GUIDs.
/// </para>
/// <para>
/// The generated values are non-temporary, meaning they will be saved to the database.
Expand Down
Loading