Browse Source

Replace Microsoft SQL Server by SQLite in the sandbox projects

pull/1695/head
Alexander Trauzzi 3 years ago
committed by GitHub
parent
commit
30c5db26f2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj
  2. 2
      sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs
  3. 2
      sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj
  4. 7
      sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs

2
sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj

@ -13,7 +13,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageReference Include="Quartz.Extensions.Hosting" />
</ItemGroup>

2
sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs

@ -19,7 +19,7 @@ public class Startup
services.AddDbContext<ApplicationDbContext>(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

2
sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj

@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageReference Include="Quartz.Extensions.Hosting" />
</ItemGroup>

7
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<ApplicationDbContext>(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

Loading…
Cancel
Save