Browse Source
Replace Microsoft SQL Server by SQLite in the sandbox projects
pull/1695/head
Alexander Trauzzi
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
4 additions and
9 deletions
-
sandbox/OpenIddict.Sandbox.AspNetCore.Client/OpenIddict.Sandbox.AspNetCore.Client.csproj
-
sandbox/OpenIddict.Sandbox.AspNetCore.Client/Startup.cs
-
sandbox/OpenIddict.Sandbox.AspNetCore.Server/OpenIddict.Sandbox.AspNetCore.Server.csproj
-
sandbox/OpenIddict.Sandbox.AspNetCore.Server/Startup.cs
|
|
|
@ -13,7 +13,7 @@ |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" /> |
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" /> |
|
|
|
<PackageReference Include="Quartz.Extensions.Hosting" /> |
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -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
|
|
|
|
|
|
|
|
@ -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> |
|
|
|
|
|
|
|
|
|
|
|
@ -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
|
|
|
|
|