public async Task <IActionResult> DeleteConfirmed(long id) { //var leaveType = await _context.LeaveTypes.FindAsync(id); //_context.LeaveTypes.Remove(leaveType); //await _context.SaveChangesAsync(); var leaveType = leaveTypeRepository.GetDelete(id); await leaveTypeRepository.Delete(leaveType); return(RedirectToAction(nameof(Index))); }