From 8e6963765c0ce9db894275b7e2fff41b9c4f9bc5 Mon Sep 17 00:00:00 2001 From: Massimiliano Donini Date: Fri, 10 Jun 2016 21:13:57 +0200 Subject: [PATCH] Update README.md to document how to properly register the OpenIddict context when using a custom key type --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 15c765ff..0c73bead 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,12 @@ public class ApplicationDbContext : IdentityDbContext { } ``` +> **Note:** if you change the default entity primary key (e.g. to `int` or `Guid` instead of `string`), make sure to register your Entity Framework context using the overload accepting a `TKey` generic argument: + +```csharp +services.AddOpenIddict, ApplicationDbContext, int>() +``` + ## Enabling interactive flows support Out-the-box, **OpenIddict only enables non-interactive flows** (resource owner password credentials, client credentials, refresh token).