default avatar

This commit is contained in:
Paul Schneider 2017-02-01 19:53:10 +01:00
commit be1d75ce73
35 changed files with 1626 additions and 15 deletions

View file

@ -0,0 +1,22 @@
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Yavsc.Helpers;
using Yavsc.Models;
namespace Yavsc.ViewComponents
{
public class AvatarViewComponent : ViewComponent
{
ApplicationDbContext dbContext;
public AvatarViewComponent(ApplicationDbContext dbContext)
{
this.dbContext = dbContext;
}
public async Task<IViewComponentResult> InvokeAsync ( string userId, string imgFmt )
{
return View ( "Default", dbContext.AvatarUri(userId, imgFmt));
}
}
}