Adds hierarchyid support to the SQL Server EF Core provider
$ dotnet add package Microsoft.EntityFrameworkCore.SqlServer.HierarchyIdMicrosoft.EntityFrameworkCore.SqlServer.HierarchyId enables use of hierarchical data for SQL Server and Azure SQL with Entity Framework Core and NetTopologySuite.
Call UseHierarchyId inside the call to UseSqServer when configuring the SQLite database provider for your DbContext. For example:
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> options.UseSqlServer(
"Server=localhost;Database=MyDatabase;Trusted_Connection=True;",
b => b.HierarchyId());
See Hierarchical Data in the SQL Server EF Core Provider for more information on HierarchyId with EF Core.
See Getting started with EF Core for more information about EF NuGet packages, including which to install when getting started.
If you encounter a bug or issues with this package,you can open an Github issue. For more details, see getting support.