BenBurgers.InternationalStandards.Iso.EFCore.SqlServer
0.5.0
See the version list below for details.
dotnet add package BenBurgers.InternationalStandards.Iso.EFCore.SqlServer --version 0.5.0
NuGet\Install-Package BenBurgers.InternationalStandards.Iso.EFCore.SqlServer -Version 0.5.0
<PackageReference Include="BenBurgers.InternationalStandards.Iso.EFCore.SqlServer" Version="0.5.0" />
paket add BenBurgers.InternationalStandards.Iso.EFCore.SqlServer --version 0.5.0
#r "nuget: BenBurgers.InternationalStandards.Iso.EFCore.SqlServer, 0.5.0"
// Install BenBurgers.InternationalStandards.Iso.EFCore.SqlServer as a Cake Addin #addin nuget:?package=BenBurgers.InternationalStandards.Iso.EFCore.SqlServer&version=0.5.0 // Install BenBurgers.InternationalStandards.Iso.EFCore.SqlServer as a Cake Tool #tool nuget:?package=BenBurgers.InternationalStandards.Iso.EFCore.SqlServer&version=0.5.0
Contents
Introduction
Thank you for choosing this package.
The BenBurgers.InternationalStandards.Iso.EFCore.SqlServer
package contains Entity Framework Core SQL Server features for codes and features that belong to standards of the International Organization for Standardization (ISO).
The International Organization for Standardization (ISO) is an international standard development organization composed of representatives from the national standards organizations of member countries. The organization develops and publishes standardization in all technical and nontechnical fields other than electrical and electronic engineering.[^1]
[^1]: Wikipedia, downloaded at 31 October 2022, 23:33 CET.
You are kindly encouraged to buy the standards you use at the ISO Store in order to fund their mission.
GitHub Sponsors
If you like my contributions, please have a look at my GitHub Sponsors profile. My open source contributions are available free of charge (but subject to licenses) and the contributions are made entirely in my free time, but sponsorship would be sincerely appreciated. Thank you.
If possible, please also buy a standard from the respective Maintenance Agency or ISO itself to cover the costs of the Maintenance Agencies and the ISO in maintaining the standards.
Packages
These are the packages that concern the ISO standards:
Name | Description |
---|---|
BenBurgers.InternationalStandards.Iso |
The main package with the codes and metadata. |
BenBurgers.InternationalStandards.Iso.EFCore |
Features for storing codes using Entity Framework Core. |
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer |
Features for storing codes using Entity Framework Core and SQL Server. |
BenBurgers.InternationalStandards.Iso.IO |
Features for reading Code Tables from authorities. |
BenBurgers.InternationalStandards.Iso.Json |
Features for serializing and deserializing codes in JSON. |
Please refer to NuGet to download the packages and GitHub for the source code.
Manual
Supported ISO standards
The following are the currently supported ISO standards.
Name | Description |
---|---|
ISO 639 | Language codes |
ISO 3166 | Country codes |
ISO 4217 | Currency codes |
Alpha
Property builders for Alpha2
and Alpha3
property values may be found in the namespace:
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Metadata.Builders
These are extension methods that may be used in the fluent configuration of entities for Entity Framework Core.
ISO 639 language codes
Property builders and a Database Context for migrations and queries may be found in the namespaces:
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Iso639
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Iso639.Metadata.Builders
ISO 3166 country codes
Property builders and a Database Context for migrations and queries may be found in the namespaces:
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Iso3166
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Iso3166.Metadata.Builders
ISO 4217 currency codes
Property builders and a Database Context for migrations and queries may be found in the namespaces:
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Iso4217
BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Iso4217.Metadata.Builders
Migrations
Bootstrapping
In order to access migrations through the dotnet-ef
tool, it is possible to create your own Migrations assembly and inherit the class BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Design.IsoDesignTimeDbContextFactory
,
with a particular Database Context for the desired standard as its type parameter.
An inherited class of BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Design.IsoDesignTimeServices
will be necessary for generating the C# migrations.
Configuration
The configuration options for the Database Context Factory may be provided by overriding the IsoSqlServerOptions
property, or command line arguments with the dotnet-ef
tool.
The configuration parameters may be found in BenBurgers.InternationalStandards.Iso.EFCore.SqlServer.Configuration.IsoSqlServerOptions
.
Multiple Database Contexts for multiple ISO standards
If there are multiple Database Contexts, it will be necessary to tell the dotnet-ef
tool which one to generate migrations for in a particular run.
The migrations will populate a specified database with a lookup table for any supported standard. The lookup table will be read-only for public database users.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- BenBurgers.InternationalStandards.Iso.EFCore (>= 0.5.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 6.0.25)
- Microsoft.Extensions.Configuration.CommandLine (>= 6.0.0)
- Microsoft.Extensions.Configuration.Json (>= 6.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 6.0.0)
-
net7.0
- BenBurgers.InternationalStandards.Iso.EFCore (>= 0.5.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 7.0.14)
- Microsoft.Extensions.Configuration.CommandLine (>= 7.0.0)
- Microsoft.Extensions.Configuration.Json (>= 7.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 7.0.0)
-
net8.0
- BenBurgers.InternationalStandards.Iso.EFCore (>= 0.5.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 8.0.0)
- Microsoft.Extensions.Configuration.CommandLine (>= 8.0.0)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 0.5.0
- .NET 8.0 support.
Version 0.4.0
- Added Entity Framework Core features for value converters and model builders.
- ISO 3166: Breaking change; Iso3166AlphaMode moved from JSON package to main package.
- ISO 3166: Country codes are now generated from the data from the ISO 3166 Maintenance Agency (Online Browsing Platform), some field names may have changed. Properties "Independent" and official full names and short names in some languages added.
- ISO 639, 3166, 4217: Comparers added.
- ISO 639, 3166, 4217: Added ToModel method for retrieving the full model of an ISO code.
- ISO 639, 3166, 4217: Added TryTo[ISO] method for attempting to convert a string to its ISO code equivalent, without throwing an exception if it fails.
- ISO 8601: Added ISO 8601 date and time value types, including EFCore and JSON converters.
- If .NET 6.0 use official .NET 6.0 packages, if .NET 7.0 use official .NET 7.0 packages.
Version 0.3.0
- ISO 639: Fixed bug; if an unassigned Part of ISO 639 was requested, an exception was thrown that said it was deprecated.
- ISO 639: Implemented stub for conversion from string to ISO 639 code.
- ISO 3166: Improved documentation.
- ISO 4217: Added ISO 4217 currency codes.
- ISO 4217/IO: Added ISO 4217 Input/Output for importing currency codes from authority.
- ISO 4217/JSON: Added ISO 4217 (de)serialization.
Version 0.2.0
- ISO 639: Added ISO 639 language codes.
- ISO 639/IO: Added ISO 639 Input/Output for importing Code Tables from authority.
- ISO 639/JSON: Added ISO 639 (de)serialization.
- ISO 3166/JSON: Support for reading (in addition to writing) ISO 3166 numeric code as string.
- Added support for .NET 7.0 .
Version 0.1.0
- ISO 3166: Added ISO 3166 country codes.
- ISO 3166/JSON: Added ISO 3166 (de)serialization.