21 lines
530 B
C#
21 lines
530 B
C#
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);
|
|
}
|
|
}
|
|
} |