Microservice demo enhancements and cleanup

pull/781/head^2
Halil ibrahim Kalkan 7 years ago
parent c2eb7314f8
commit 47dfa65589

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace AuthServer.Host.Pages
{
public class IndexModel : PageModel
public class IndexModel : AbpPageModel
{
public void OnGet()
{

@ -1,4 +1,17 @@
@page
@using Volo.Abp.Users
@model PublicWebSite.Host.Pages.IndexModel
@inject ICurrentUser CurrentUser
<h1>Public Web Site Application</h1>
<h2 class="lead">Welcome...</h2>
<h2 class="lead">Welcome...</h2>
@if (CurrentUser.IsAuthenticated)
{
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">Logout</a>
}
else
{
<form method="POST">
<input type="submit" asp-page-handler="Login" value="Login" />
</form>
}

@ -1,16 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Authentication;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace PublicWebSite.Host.Pages
{
public class IndexModel : PageModel
public class IndexModel : AbpPageModel
{
public void OnGet()
{
}
public async Task OnPostLoginAsync()
{
await HttpContext.ChallengeAsync("oidc");
}
}
}

@ -1,12 +1,12 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
using MyCompanyName.ProductManagement;
using ProductManagement;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace PublicWebSite.Host.Pages
{
public class ProductsModel : PageModel
public class ProductsModel : AbpPageModel
{
public ListResultDto<ProductDto> Products { get; set; }

@ -0,0 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
Loading…
Cancel
Save