Skip to content

Commit

Permalink
Rnamed the project
Browse files Browse the repository at this point in the history
  • Loading branch information
JonPSmith committed May 25, 2021
1 parent f28586e commit 6be847e
Show file tree
Hide file tree
Showing 23 changed files with 33 additions and 85 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace Example1.RazorApp.IndividualAccounts.Data
namespace Example1.RazorPages.IndividualAccounts.Data
{
public class ApplicationDbContext : IdentityDbContext
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System;

namespace Example1.RazorApp.IndividualAccounts.Data.Migrations
namespace Example1.RazorPages.IndividualAccounts.Data.Migrations
{
public partial class CreateIdentitySchema : Migration
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// <auto-generated />
using Example1.RazorApp.IndividualAccounts.Data;
using Example1.RazorPages.IndividualAccounts.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using System;
using Example1.RazorPages.IndividualAccounts.Data;

namespace Example1.RazorApp.IndividualAccounts.Data.Migrations
namespace Example1.RazorPages.IndividualAccounts.Data.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<UserSecretsId>aspnet-Example1.RazorApp.IndividualAccounts-9BFCF434-1CBC-460C-98B7-CBCEDC0204D8</UserSecretsId>
<UserSecretsId>aspnet-Example1.RazorPages.IndividualAccounts-9BFCF434-1CBC-460C-98B7-CBCEDC0204D8</UserSecretsId>
<CopyRefAssembliesToPublishDirectory>false</CopyRefAssembliesToPublishDirectory>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page
@model Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn.LoggedInAuthorizeModel
@model Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn.LoggedInAuthorizeModel
@{
ViewData["Title"] = "AuthBuiltIn.LoggedInConfigure";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn
namespace Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn
{
[Authorize]
public class LoggedInAuthorizeModel : PageModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page
@model Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn.LoggedInConfigureModel
@model Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn.LoggedInConfigureModel
@{
ViewData["Title"] = "AuthBuiltIn.LoggedInConfigure";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn
namespace Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn
{
public class LoggedInConfigureModel : PageModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page
@model Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn.LoggedInUserModel
@model Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn.LoggedInUserModel
@{
ViewData["Title"] = "AuthBuiltIn.LoggedInUser";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn
namespace Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn
{
public class LoggedInUserModel : PageModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page
@model Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn.PublicModel
@model Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn.PublicModel
@{
ViewData["Title"] = "AuthBuiltIn.Public";
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn
namespace Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn
{
public class PublicModel : PageModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@page
@model Example1.RazorApp.IndividualAccounts.Pages.AuthBuiltIn.PublicModel
@model Example1.RazorPages.IndividualAccounts.Pages.AuthBuiltIn.PublicModel
@{
ViewData["Title"] = "AuthBuiltIn.LoggedInAttribute";
}
Expand Down
8 changes: 2 additions & 6 deletions Example1.RazorPages.IndividualAccounts/Pages/Error.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;

namespace Example1.RazorApp.IndividualAccounts.Pages
namespace Example1.RazorPages.IndividualAccounts.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
Expand Down
9 changes: 2 additions & 7 deletions Example1.RazorPages.IndividualAccounts/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Example1.RazorApp.IndividualAccounts.Pages
namespace Example1.RazorPages.IndividualAccounts.Pages
{
public class IndexModel : PageModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Example1.RazorApp.IndividualAccounts.Pages
namespace Example1.RazorPages.IndividualAccounts.Pages
{
public class PrivacyModel : PageModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Example1.RazorApp.IndividualAccounts</title>
<title>@ViewData["Title"] - Example1.RazorPages.IndividualAccounts</title>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-page="/Index">Example1.RazorApp.IndividualAccounts</a>
<a class="navbar-brand" asp-area="" asp-page="/Index">Example1.RazorPages.IndividualAccounts</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand All @@ -38,7 +38,7 @@

<footer class="border-top footer text-muted">
<div class="container">
&copy; 2021 - Example1.RazorApp.IndividualAccounts - <a asp-area="" asp-page="/Privacy">Privacy</a>
&copy; 2021 - Example1.RazorPages.IndividualAccounts - <a asp-area="" asp-page="/Privacy">Privacy</a>
</div>
</footer>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
@using Microsoft.AspNetCore.Identity
@using Example1.RazorApp.IndividualAccounts
@using Example1.RazorApp.IndividualAccounts.Data
@namespace Example1.RazorApp.IndividualAccounts.Pages
@namespace Example1.RazorPages.IndividualAccounts.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
8 changes: 1 addition & 7 deletions Example1.RazorPages.IndividualAccounts/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Example1.RazorApp.IndividualAccounts
namespace Example1.RazorPages.IndividualAccounts
{
public class Program
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
}
},
"Example1.RazorApp.IndividualAccounts": {
"Example1.RazorPages.IndividualAccounts": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
Expand Down
2 changes: 1 addition & 1 deletion Example1.RazorPages.IndividualAccounts/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example1.RazorApp.IndividualAccounts
# Example1.RazorPages.IndividualAccounts

This project contains a example of using the AuthPermissions.AspNetCore library in ASP.NET Core razor page web app with user data provided by the individual accounts approach. This is one of the simplest approaches using:

Expand Down
11 changes: 2 additions & 9 deletions Example1.RazorPages.IndividualAccounts/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
using Example1.RazorApp.IndividualAccounts.Data;
using Example1.RazorPages.IndividualAccounts.Data;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.UI;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;

namespace Example1.RazorApp.IndividualAccounts
namespace Example1.RazorPages.IndividualAccounts
{
public class Startup
{
Expand Down

0 comments on commit 6be847e

Please sign in to comment.