Skip to content

Commit 1c942fa

Browse files
committed
Initial migration
1 parent 70c289f commit 1c942fa

6 files changed

Lines changed: 762 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.27703.2026
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6D831465-566F-449A-8D71-B90FE94696B5}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IdentityManager2.AspNetIdentity", "src\IdentityManager2.AspNetIdentity\IdentityManager2.AspNetIdentity.csproj", "{0BA18FB3-87DD-4E34-8B73-48D395EB2D61}"
9+
EndProject
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Host", "src\Host\Host.csproj", "{4334AE90-8FAD-4D90-9BED-53A8CCBA7EAD}"
11+
EndProject
12+
Global
13+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
14+
Debug|Any CPU = Debug|Any CPU
15+
Release|Any CPU = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{0BA18FB3-87DD-4E34-8B73-48D395EB2D61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19+
{0BA18FB3-87DD-4E34-8B73-48D395EB2D61}.Debug|Any CPU.Build.0 = Debug|Any CPU
20+
{0BA18FB3-87DD-4E34-8B73-48D395EB2D61}.Release|Any CPU.ActiveCfg = Release|Any CPU
21+
{0BA18FB3-87DD-4E34-8B73-48D395EB2D61}.Release|Any CPU.Build.0 = Release|Any CPU
22+
{4334AE90-8FAD-4D90-9BED-53A8CCBA7EAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23+
{4334AE90-8FAD-4D90-9BED-53A8CCBA7EAD}.Debug|Any CPU.Build.0 = Debug|Any CPU
24+
{4334AE90-8FAD-4D90-9BED-53A8CCBA7EAD}.Release|Any CPU.ActiveCfg = Release|Any CPU
25+
{4334AE90-8FAD-4D90-9BED-53A8CCBA7EAD}.Release|Any CPU.Build.0 = Release|Any CPU
26+
EndGlobalSection
27+
GlobalSection(SolutionProperties) = preSolution
28+
HideSolutionNode = FALSE
29+
EndGlobalSection
30+
GlobalSection(NestedProjects) = preSolution
31+
{0BA18FB3-87DD-4E34-8B73-48D395EB2D61} = {6D831465-566F-449A-8D71-B90FE94696B5}
32+
{4334AE90-8FAD-4D90-9BED-53A8CCBA7EAD} = {6D831465-566F-449A-8D71-B90FE94696B5}
33+
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {CC13BC70-3120-4315-9930-B139D39C8C23}
36+
EndGlobalSection
37+
EndGlobal

src/Host/Host.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp2.1</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<PackageReference Include="Microsoft.AspNetCore.App" />
9+
</ItemGroup>
10+
11+
<ItemGroup>
12+
<ProjectReference Include="..\IdentityManager2.AspNetIdentity\IdentityManager2.AspNetIdentity.csproj" />
13+
</ItemGroup>
14+
15+
</Project>

src/Host/Program.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore;
7+
using Microsoft.AspNetCore.Hosting;
8+
using Microsoft.Extensions.Configuration;
9+
using Microsoft.Extensions.Logging;
10+
11+
namespace Host
12+
{
13+
public class Program
14+
{
15+
public static void Main(string[] args)
16+
{
17+
CreateWebHostBuilder(args).Build().Run();
18+
}
19+
20+
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21+
WebHost.CreateDefaultBuilder(args)
22+
.UseStartup<Startup>();
23+
}
24+
}

src/Host/Startup.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using IdentityManager2.AspNetIdentity;
2+
using IdentityManager2.Configuration;
3+
using Microsoft.AspNetCore.Builder;
4+
using Microsoft.AspNetCore.Hosting;
5+
using Microsoft.AspNetCore.Identity;
6+
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
7+
using Microsoft.EntityFrameworkCore;
8+
using Microsoft.Extensions.DependencyInjection;
9+
10+
namespace Host
11+
{
12+
public class Startup
13+
{
14+
public void ConfigureServices(IServiceCollection services)
15+
{
16+
services.AddDbContext<IdentityDbContext>(opt => opt.UseInMemoryDatabase("test"));
17+
18+
services.AddIdentity<IdentityUser, IdentityRole>()
19+
.AddEntityFrameworkStores<IdentityDbContext>()
20+
.AddDefaultTokenProviders();
21+
22+
services.AddIdentityManager()
23+
.AddIdentityMangerService<AspNetCoreIdentityManagerService<IdentityUser, string, IdentityRole, string>>();
24+
}
25+
26+
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
27+
{
28+
app.UseDeveloperExceptionPage();
29+
30+
app.UseIdentityManager();
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)