Browse Source

Microservice demo enhancements and cleanup

pull/783/head
Halil ibrahim Kalkan 8 years ago
parent
commit
47dfa65589
  1. 4
      samples/MicroserviceDemo/applications/AuthServer.Host/Pages/Index.cshtml.cs
  2. 15
      samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/Index.cshtml
  3. 15
      samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/Index.cshtml.cs
  4. 4
      samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/Products.cshtml.cs
  5. 4
      samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/_ViewImports.cshtml
  6. BIN
      samples/MicroserviceDemo/applications/PublicWebSite.Host/wwwroot/files/ec882345a403be325bc539ebda211e79.jpg

4
samples/MicroserviceDemo/applications/AuthServer.Host/Pages/Index.cshtml.cs

@ -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()
{

15
samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/Index.cshtml

@ -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>
}

15
samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/Index.cshtml.cs

@ -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");
}
}
}

4
samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/Products.cshtml.cs

@ -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; }

4
samples/MicroserviceDemo/applications/PublicWebSite.Host/Pages/_ViewImports.cshtml

@ -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

BIN
samples/MicroserviceDemo/applications/PublicWebSite.Host/wwwroot/files/ec882345a403be325bc539ebda211e79.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Loading…
Cancel
Save