Skip to content

Commit

Permalink
Option for Default SqliteConnectionString
Browse files Browse the repository at this point in the history
  • Loading branch information
shps951023 committed Jun 15, 2024
1 parent 06c9b46 commit f2c06ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static class MiniAuthIdentityServiceExtensions
private static IServiceCollection AddMiniIdentityAuth(this IServiceCollection services, bool isAutoUse)
{
_ = services ?? throw new ArgumentNullException(nameof(services));
var connectionString = "Data Source=miniauth_identity.db";
var connectionString = MiniAuthOptions.SqliteConnectionString;
services.AddDbContext<MiniAuthIdentityDbContext>(options =>
{
options.UseSqlite(connectionString);
Expand Down
1 change: 1 addition & 0 deletions src/MiniAuth.IdentityAuth/MiniAuthOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ public enum AuthType
/// </summary>
public static int TokenExpiresIn = 30*60;
public static string Issuer = $"{RoutePrefix}";
public static string SqliteConnectionString = "Data Source=miniauth_identity.db";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.6" />
<!--<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.6" />-->
<PackageReference Include="Microsoft.EntityFrameworkCore.SQLite" Version="8.0.6" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.6.2" />
Expand Down

0 comments on commit f2c06ab

Please sign in to comment.