Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
SqlServerModelBuilderExtensions.UseHiLo(ModelBuilder, String, String) Method
Definition
- Namespace:
- Microsoft.EntityFrameworkCore
- Assembly:
- Microsoft.EntityFrameworkCore.SqlServer.dll
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v10.0.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v3.0.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v3.1.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v5.0.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v6.0.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v7.0.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v8.0.0
- Package:
- Microsoft.EntityFrameworkCore.SqlServer v9.0.0
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Configures the model to use a sequence-based hi-lo pattern to generate values for key properties marked as OnAdd, when targeting SQL Server.
public static Microsoft.EntityFrameworkCore.ModelBuilder UseHiLo(this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, string? name = default, string? schema = default);
public static Microsoft.EntityFrameworkCore.ModelBuilder UseHiLo(this Microsoft.EntityFrameworkCore.ModelBuilder modelBuilder, string name = default, string schema = default);
static member UseHiLo : Microsoft.EntityFrameworkCore.ModelBuilder * string * string -> Microsoft.EntityFrameworkCore.ModelBuilder
<Extension()>
Public Function UseHiLo (modelBuilder As ModelBuilder, Optional name As String = Nothing, Optional schema As String = Nothing) As ModelBuilder
Parameters
- modelBuilder
- ModelBuilder
The model builder.
- name
- String
The name of the sequence.
- schema
- String
The schema of the sequence.
Returns
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships, and Accessing SQL Server and Azure SQL databases with EF Core for more information and examples.
Applies to
Entity Framework
Feedback
Was this page helpful?
