public ActionResult Index()
{
GetEmployee();
return View();
}
private void GetEmployee()
{
SocialMedia item = new SocialMedia();
var employee = _employeeRepository.GetById(Session.GetEmployeeNo());
//employee.No, employee.ManagerNo
item.FirstName = employee.FirstName;
item.LastName = employee.LastName;
item.Departmen = employee.PositionCode;
item.FullName = item.FirstName + " " + item.LastName;
}
And my HTML
@using Models.Model
@model Models.Model.SocialMedia
<div>
@Html.LabelFor(model => model.FullName)
</div>
<div>
@Html.LabelFor(model=>model.Departmen)
</div>
And My result is
FullName
Departmen
Name,surname and departmen were supposed to come but didn’t.
Can you help me