Update automapper

This commit is contained in:
2016-09-24 00:06:34 -04:00
parent f473c64540
commit 6789c1b3b5
32 changed files with 254 additions and 206 deletions
@@ -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);
}