public ActionResult Myleave() { var employee = _userManager.GetUserAsync(User).Result; var employeeid = employee.Id; var employeeallocations = _leavAllocationrepo.GetLeaveAllocationsByEmployeeId(employeeid); var employeeleaverequest = _leaveRequestrepo.GetLeaveRequestByEmployeeId(employeeid); var emoployeeallocationsModel = _mapper.Map <List <LeaveAllocationVM> >(employeeallocations); var emoployeerequestModel = _mapper.Map <List <LeaveRequestVM> >(employeeleaverequest); var model = new EmployeeRequestViewVM { LeaveAllocationVMs = emoployeeallocationsModel, LeaveRequests = emoployeerequestModel }; return(View(model)); }