diff --git a/Webzine.WebApplication/Components/Sidebar/Default.cs b/Webzine.WebApplication/Components/Sidebar/Default.cs deleted file mode 100644 index c9f1be5..0000000 --- a/Webzine.WebApplication/Components/Sidebar/Default.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.AspNetCore.Mvc; -using Webzine.Repository.Contracts; - -namespace Webzine.Components -{ - public class SidebarViewComponent : ViewComponent - { - private readonly IStyleRepository styleRepository; - - public SidebarViewComponent(IStyleRepository styleRepository) - { - this.styleRepository = styleRepository; - } - - public IViewComponentResult Invoke() - { - var styles = this.styleRepository.FindAll(); - return this.View(styles); - } - } -} \ No newline at end of file diff --git a/Webzine.WebApplication/Views/Shared/_Layout.cshtml b/Webzine.WebApplication/Views/Shared/_Layout.cshtml index e330c9d..234b357 100644 --- a/Webzine.WebApplication/Views/Shared/_Layout.cshtml +++ b/Webzine.WebApplication/Views/Shared/_Layout.cshtml @@ -19,7 +19,7 @@ @if(ViewContext.RouteData.Values["area"]?.ToString() != "Administration") { - @await Component.InvokeAsync("Sidebar") + } diff --git a/Webzine.WebApplication/Views/Shared/_Sidebar.cshtml b/Webzine.WebApplication/Views/Shared/_Sidebar.cshtml index 2a48b2e..49dedf2 100644 --- a/Webzine.WebApplication/Views/Shared/_Sidebar.cshtml +++ b/Webzine.WebApplication/Views/Shared/_Sidebar.cshtml @@ -1,5 +1,8 @@ -@model IEnumerable - +@* + For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 +*@ +@{ +} \ No newline at end of file