From 30c5db26f20869de45465fcb2087deec037da33c Mon Sep 17 00:00:00 2001 From: Alexander Trauzzi Date: Sat, 25 Feb 2023 11:22:53 -0600 Subject: [PATCH] Replace Microsoft SQL Server by SQLite in the sandbox projects --- .../OpenIddict.Sandbox.AspNetCore.Client.csproj | 2 +- sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs | 2 +- .../OpenIddict.Sandbox.AspNetCore.Server.csproj | 2 +- sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs | 7 +------ 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj index 1b911d71..e0271a38 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj @@ -13,7 +13,7 @@ - + diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs index dc923077..5ecf3711 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs @@ -19,7 +19,7 @@ public class Startup services.AddDbContext(options => { // Configure the context to use Microsoft SQL Server. - options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")); + options.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-aspnetcore-client.sqlite3")}"); // Register the entity sets needed by OpenIddict. // Note: use the generic overload if you need diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj index d9564a13..e52acc10 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj @@ -17,7 +17,7 @@ - + diff --git a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs index 3d678bc3..8f815329 100644 --- a/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs +++ b/sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs @@ -9,11 +9,6 @@ namespace OpenIddict.Sandbox.AspNetCore.Server; public class Startup { - public Startup(IConfiguration configuration) - => Configuration = configuration; - - public IConfiguration Configuration { get; } - public void ConfigureServices(IServiceCollection services) { services.AddControllersWithViews(); @@ -21,7 +16,7 @@ public class Startup services.AddDbContext(options => { // Configure the context to use Microsoft SQL Server. - options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")); + options.UseSqlite($"Filename={Path.Combine(Path.GetTempPath(), "openiddict-sandbox-aspnetcore-server.sqlite3")}"); // Register the entity sets needed by OpenIddict. // Note: use the generic overload if you need