diff --git a/Yavsc/ViewComponents/BlogIndexViewComponent.cs b/Yavsc/ViewComponents/BlogIndexViewComponent.cs new file mode 100644 index 00000000..d4eaca09 --- /dev/null +++ b/Yavsc/ViewComponents/BlogIndexViewComponent.cs @@ -0,0 +1,34 @@ +using System.Threading.Tasks; +using Microsoft.AspNet.Mvc; +using Microsoft.AspNet.Identity; +using Microsoft.Extensions.Logging; +using Microsoft.AspNet.Authorization; +using Microsoft.Extensions.OptionsModel; +using Yavsc.Models; + +namespace Yavsc.ViewComponents +{ + public class BlogIndexViewComponent: ViewComponent + { + ILogger _logger; + private ApplicationDbContext _context; + private IAuthorizationService _authorizationService; + public BlogIndexViewComponent( + ApplicationDbContext context, + UserManager userManager, + ILoggerFactory loggerFactory, + IAuthorizationService authorizationService, + IOptions siteSettings) + { + _context = context; + _logger = loggerFactory.CreateLogger(); + _authorizationService = authorizationService; + } + + // Renders blog index ofr the specified user by name + public async Task InvokeAsync(string userName) + { + return View("Default"); + } + } +} \ No newline at end of file