-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migration of library to .NET Standard 2.1 + sample app to .NET Core 3.1
- Loading branch information
Lukas Kubis
committed
Apr 22, 2020
1 parent
c9b9225
commit bf0f400
Showing
13 changed files
with
162 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/AspNetCore.Identity.Cassandra/Extensions/ApplicationBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace AspNetCore.Identity.Cassandra.Extensions | ||
{ | ||
public static class ApplicationBuilderExtensions | ||
{ | ||
public static IApplicationBuilder UseCassandra<TUser, TRole>(this IApplicationBuilder app) | ||
{ | ||
using (var scope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) | ||
{ | ||
var services = scope.ServiceProvider; | ||
var options = services.GetService<CassandraOptions>(); | ||
var initializer = services.GetService<DbInitializer>(); | ||
|
||
if (initializer is null) | ||
return app; | ||
|
||
initializer.Initialize<TUser, TRole>(options); | ||
return app; | ||
} | ||
} | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
src/AspNetCore.Identity.Cassandra/Extensions/IWebHostExtensions.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.