default avatar
This commit is contained in:
parent
c7e3f3af47
commit
be1d75ce73
35 changed files with 1626 additions and 15 deletions
22
Yavsc/ViewComponents/AvatarViewComponent.cs
Normal file
22
Yavsc/ViewComponents/AvatarViewComponent.cs
Normal 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));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue