Skip to content

Commit b6062e9

Browse files
committed
Add another sample application.
1 parent ec848d6 commit b6062e9

File tree

60 files changed

+40558
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+40558
-6
lines changed

DynamicRoleBasedAuthorization.sln

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicRoleBasedAuthorizati
2525
EndProject
2626
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicAuthorization.Mvc.Ui", "src\DynamicAuthorization.Mvc.Ui\DynamicAuthorization.Mvc.Ui.csproj", "{4D5C1490-63F8-434A-A730-380AA6441CE9}"
2727
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleMvcWebAppWithUi", "samples\netcore3.x\SampleMvcWebAppWithUi\SampleMvcWebAppWithUi.csproj", "{043FB17F-5C3F-47B8-B4C0-B7AB1AC12A29}"
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleMvcWebAppWithUi", "samples\netcore3.x\SampleMvcWebAppWithUi\SampleMvcWebAppWithUi.csproj", "{803E1492-22FA-4F63-9687-A30902682C15}"
2929
EndProject
3030
Global
3131
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -57,10 +57,10 @@ Global
5757
{4D5C1490-63F8-434A-A730-380AA6441CE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
5858
{4D5C1490-63F8-434A-A730-380AA6441CE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
5959
{4D5C1490-63F8-434A-A730-380AA6441CE9}.Release|Any CPU.Build.0 = Release|Any CPU
60-
{043FB17F-5C3F-47B8-B4C0-B7AB1AC12A29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61-
{043FB17F-5C3F-47B8-B4C0-B7AB1AC12A29}.Debug|Any CPU.Build.0 = Debug|Any CPU
62-
{043FB17F-5C3F-47B8-B4C0-B7AB1AC12A29}.Release|Any CPU.ActiveCfg = Release|Any CPU
63-
{043FB17F-5C3F-47B8-B4C0-B7AB1AC12A29}.Release|Any CPU.Build.0 = Release|Any CPU
60+
{803E1492-22FA-4F63-9687-A30902682C15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
61+
{803E1492-22FA-4F63-9687-A30902682C15}.Debug|Any CPU.Build.0 = Debug|Any CPU
62+
{803E1492-22FA-4F63-9687-A30902682C15}.Release|Any CPU.ActiveCfg = Release|Any CPU
63+
{803E1492-22FA-4F63-9687-A30902682C15}.Release|Any CPU.Build.0 = Release|Any CPU
6464
EndGlobalSection
6565
GlobalSection(SolutionProperties) = preSolution
6666
HideSolutionNode = FALSE
@@ -74,7 +74,7 @@ Global
7474
{A3124728-6766-48A3-BA1A-5CB119924395} = {11B88EB7-66BE-402A-A4E0-144220EBD8B9}
7575
{0FC61895-DE38-4526-96EE-C6CB6AA92A3B} = {DF22D7D8-4CE9-4A0E-9D9B-FB5D6D637089}
7676
{4D5C1490-63F8-434A-A730-380AA6441CE9} = {A7EEBB7E-C64D-4475-93D0-872E080A4E03}
77-
{043FB17F-5C3F-47B8-B4C0-B7AB1AC12A29} = {5FEB9007-1EFA-4814-BC15-DB0370B84E22}
77+
{803E1492-22FA-4F63-9687-A30902682C15} = {5FEB9007-1EFA-4814-BC15-DB0370B84E22}
7878
EndGlobalSection
7979
GlobalSection(ExtensibilityGlobals) = postSolution
8080
SolutionGuid = {18C80710-C9E9-488B-9100-1E4BF8B18038}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@{
2+
Layout = "/Views/Shared/_Layout.cshtml";
3+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Mvc;
7+
using Microsoft.Extensions.Logging;
8+
using SampleMvcWebAppWithUi.Models;
9+
10+
namespace SampleMvcWebAppWithUi.Controllers
11+
{
12+
public class HomeController : Controller
13+
{
14+
private readonly ILogger<HomeController> _logger;
15+
16+
public HomeController(ILogger<HomeController> logger)
17+
{
18+
_logger = logger;
19+
}
20+
21+
public IActionResult Index()
22+
{
23+
return View();
24+
}
25+
26+
public IActionResult Privacy()
27+
{
28+
return View();
29+
}
30+
31+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
32+
public IActionResult Error()
33+
{
34+
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
35+
}
36+
}
37+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
2+
using Microsoft.EntityFrameworkCore;
3+
using SampleMvcWebAppWithUi.Models;
4+
5+
namespace SampleMvcWebAppWithUi.Data
6+
{
7+
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
8+
{
9+
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
10+
: base(options)
11+
{
12+
}
13+
}
14+
}

samples/netcore3.x/SampleMvcWebAppWithUi/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs

Lines changed: 277 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)