// POST: LeaveRequest public async Task <ActionResult> ApplyForLeave() { LeaveRequestViewModel leaveRequestViewModel = new LeaveRequestViewModel(); List <LeaveType> leaveTypes = await _leaveTypeRepo.GetAllLeaveTypes(); var leaveTypeViewModel = _mapper.Map <List <LeaveType>, List <LeaveTypesVM> >(leaveTypes); leaveRequestViewModel.LeaveTypes = leaveTypeViewModel; return(View(leaveRequestViewModel)); }