From 9717e1bda8a0b82a84cbfe75aa85876154c48d97 Mon Sep 17 00:00:00 2001 From: Fiyaz Bin Hasan Date: Tue, 20 Apr 2021 07:46:43 +0600 Subject: [PATCH] added missing instruction for scaffolding uisng SQLite (#22081) * added missing instruction for scaffolding uisng SQLite * Update identity.md Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> --- aspnetcore/security/authentication/identity.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aspnetcore/security/authentication/identity.md b/aspnetcore/security/authentication/identity.md index c1f8160bc3..806ba01318 100644 --- a/aspnetcore/security/authentication/identity.md +++ b/aspnetcore/security/authentication/identity.md @@ -146,13 +146,19 @@ Add the `Register`, `Login`, `LogOut`, and `RegisterConfirmation` files. Follow # [.NET Core CLI](#tab/netcore-cli) -If you created the project with name **WebApp1**, run the following commands. Otherwise, use the correct namespace for the `ApplicationDbContext`: +If you created the project with name **WebApp1**, and you're not using SQLite, run the following commands. Otherwise, use the correct namespace for the `ApplicationDbContext`: ```dotnetcli dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design dotnet aspnet-codegenerator identity -dc WebApp1.Data.ApplicationDbContext --files "Account.Register;Account.Login;Account.Logout;Account.RegisterConfirmation" ``` +When using SQLite, append `--useSqlite` or `-sqlite`: + +```dotnetcli +dotnet aspnet-codegenerator identity -dc WebAppAuth.Data.ApplicationDbContext --files "Account.Register;Account.Login;Account.Logout;Account.RegisterConfirmation" --useSqlite +``` + PowerShell uses semicolon as a command separator. When using PowerShell, escape the semicolons in the file list or put the file list in double quotes, as the preceding example shows. For more information on scaffolding Identity, see [Scaffold identity into a Razor project with authorization](xref:security/authentication/scaffold-identity#scaffold-identity-into-a-razor-project-with-authorization).