Update automapper
This commit is contained in:
@@ -10,16 +10,18 @@ namespace InventoryTraker.Web.Controllers
|
||||
public class ProfileController : ControllerBase
|
||||
{
|
||||
private readonly ApplicationUserManager _userManager;
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
public ProfileController(ApplicationUserManager userManager)
|
||||
public ProfileController(ApplicationUserManager userManager, IMapper mapper)
|
||||
{
|
||||
_userManager = userManager;
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
{
|
||||
var user = _userManager.FindById(User.Identity.GetUserId());
|
||||
var model = Mapper.Map<ProfileForm>(user);
|
||||
var model = _mapper.Map<ProfileForm>(user);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user