forked from PlanBGmbH/PlanButlerV2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb12359
commit 0fdce7c
Showing
7 changed files
with
91 additions
and
26 deletions.
There are no files selected for viewing
38 changes: 29 additions & 9 deletions
38
PlanB.Butler.Admin/PlanB.Butler.Admin/Controllers/HomeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,57 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
// Copyright (c) PlanB. GmbH. All Rights Reserved. | ||
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. | ||
|
||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Extensions.Logging; | ||
using PlanB.Butler.Admin.Models; | ||
|
||
namespace PlanB.Butler.Admin.Controllers | ||
{ | ||
/// <summary> | ||
/// HomeController. | ||
/// </summary> | ||
/// <seealso cref="Microsoft.AspNetCore.Mvc.Controller" /> | ||
public class HomeController : Controller | ||
{ | ||
private readonly ILogger<HomeController> _logger; | ||
private readonly ILogger<HomeController> logger; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="HomeController"/> class. | ||
/// </summary> | ||
/// <param name="logger">The logger.</param> | ||
public HomeController(ILogger<HomeController> logger) | ||
{ | ||
_logger = logger; | ||
this.logger = logger; | ||
} | ||
|
||
/// <summary> | ||
/// Indexes this instance. | ||
/// </summary> | ||
/// <returns>IActionResult.</returns> | ||
public IActionResult Index() | ||
{ | ||
return View(); | ||
return this.View(); | ||
} | ||
|
||
/// <summary> | ||
/// Privacies this instance. | ||
/// </summary> | ||
/// <returns>Policy.</returns> | ||
public IActionResult Privacy() | ||
{ | ||
return View(); | ||
return this.View(); | ||
} | ||
|
||
/// <summary> | ||
/// Errors this instance. | ||
/// </summary> | ||
/// <returns>Error.</returns> | ||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] | ||
public IActionResult Error() | ||
{ | ||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); | ||
return this.View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? this.HttpContext.TraceIdentifier }); | ||
} | ||
} | ||
} |
19 changes: 15 additions & 4 deletions
19
PlanB.Butler.Admin/PlanB.Butler.Admin/Controllers/RestaurantController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,30 @@ | ||
using System; | ||
// Copyright (c) PlanB. GmbH. All Rights Reserved. | ||
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
// For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace PlanB.Butler.Admin.Controllers | ||
{ | ||
/// <summary> | ||
/// RestaurantController. | ||
/// </summary> | ||
/// <seealso cref="Microsoft.AspNetCore.Mvc.Controller" /> | ||
public class RestaurantController : Controller | ||
{ | ||
// GET: /<controller>/ | ||
|
||
/// <summary> | ||
/// Indexes this instance. | ||
/// </summary> | ||
/// <returns>Index.</returns> | ||
public IActionResult Index() | ||
{ | ||
return View(); | ||
return this.View(); | ||
} | ||
} | ||
} |
20 changes: 19 additions & 1 deletion
20
PlanB.Butler.Admin/PlanB.Butler.Admin/Models/ErrorViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
// Copyright (c) PlanB. GmbH. All Rights Reserved. | ||
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. | ||
|
||
using System; | ||
|
||
namespace PlanB.Butler.Admin.Models | ||
{ | ||
/// <summary> | ||
/// ErrorViewModel. | ||
/// </summary> | ||
public class ErrorViewModel | ||
{ | ||
/// <summary> | ||
/// Gets or sets the request identifier. | ||
/// </summary> | ||
/// <value> | ||
/// The request identifier. | ||
/// </value> | ||
public string RequestId { get; set; } | ||
|
||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); | ||
/// <summary> | ||
/// Gets a value indicating whether to show request identifier. | ||
/// </summary> | ||
/// <value> | ||
/// <c>true</c> if to show request identifier; otherwise, <c>false</c>. | ||
/// </value> | ||
public bool ShowRequestId => !string.IsNullOrEmpty(this.RequestId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters