Last post May 21, 2019 04:21 PM by DA924
May 21, 2019 01:26 PM|demoninside9|LINK
In my MVC application I am using Controller with views using Entity Framework.
So the result I got below code in my view
@Html.DisplaylFor(model => model.updatedby)
Here the issue is that model => model.updatedby gives the
User_Id and here I need name of that user.
My question is how can I put a join with the tblUser in view bt using User_Id? or do I need to follow another approach?
As I found that my application doesn't have complex logic so I choose Controller with views using Entity Framework.
May 21, 2019 02:26 PM|john_mm|LINK
Im not sure I understand what u need but
here r few ways you can learn how to get the user what ever data from the table as u can c , user manger & get the value that u need is the easy way
ViewBag.user = _userManager.GetUserId(this.User);
ViewBag.name = _userManager.GetUserName(this.User);
ViewBag.userId = User.FindFirstValue(ClaimTypes.NameIdentifier);
May 21, 2019 04:21 PM|DA924|LINK
or do I need to follow another approach?