Skip to content

Commit

Permalink
Correct documentation for SequentialGuidValueGenerator (#20696)
Browse files Browse the repository at this point in the history
  • Loading branch information
roji authored Apr 20, 2020
1 parent f95c45d commit bfc0bfc
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/EFCore/ValueGeneration/SequentialGuidValueGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@
namespace Microsoft.EntityFrameworkCore.ValueGeneration
{
/// <summary>
/// Generates sequential <see cref="Guid" /> values using the same algorithm as NEWSEQUENTIALID()
/// in Microsoft SQL Server. This is useful when entities are being saved to a database where sequential
/// GUIDs will provide a performance benefit. The generated values are non-temporary, meaning they will
/// be saved to the database.
/// <para>
/// Generates sequential <see cref="Guid" /> values optimized for use in Microsoft SQL server clustered
/// keys or indexes, yielding better performance than random values. This is the default generator for
/// SQL Server <see cref="Guid" /> columns which are set to be generated on add.
/// </para>
/// <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.
/// </para>
/// <para>
/// The generated values are non-temporary, meaning they will be saved to the database.
/// </para>
/// </summary>
public class SequentialGuidValueGenerator : ValueGenerator<Guid>
{
Expand Down

0 comments on commit bfc0bfc

Please sign in to comment.