Como adiciono um menu suspenso "modelo" em um modelo de lista IPaged?

Eu tenho uma página para exibir todos os logs (mensagem, hora, tipo, customerId, Name) em uma tabela html. Como o log é enorme, estou usando uma IPagedList no Razor MVC e isso funciona perfeitamente. Atualmente, tenho 2 caixas de pesquisa (para administradores) e 1 para membros. Onde você pode pesquisar pela mensagem e pelo ID do cliente.

Agora, o problema é que eu não quero que os usuários tenham apenas uma caixa de texto em que você possa inserir apenas um número (por exemplo, você insere o ID do cliente 2 e obtém o cliente T) - mas, em vez disso, quero um menu suspenso com todos os nomes atuais de clientes conectados aos IDs de clientes.

Eu tenho essa funcionalidade em outra página que uso, mas só funciona porque eu retorno o modelo na outra página e porque a página de log retorna um "IPagedListModel" em vez de um "Modelo". Não posso usar esta solução. Como eu faria essa solução funcionar para minha página de log também?

Código HTML

@:<p>@Html.DropDownListFor(m => m.SelectedCustomer, Model.CustomerList)</p>

Modelo

using System;
using System.Linq;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Collections.Generic;
using PagedList;
using System.Web.Mvc;

namespace ASDMVC.Models
{
    [Table("Log")]
    public class LogModel
    {
        [Key]
        public long id { get; set; }
        public string message { get; set; }
        public DateTime timeStamp { get; set; }
        public string level { get; set; }
        public int customerId { get; set; }
        [NotMapped]
        public string Name { get; set; }
    }

    public class LogModelVM
    {
        public int SelectedCustomer { get; set; }
        public IEnumerable<SelectListItem> CustomerList { get; set; }
        public string Message { get; set; } 
        public IPagedList<LogModel> Logs { get; set; }
    }

    public class LogDBContext:DbContext
    {
        public LogDBContext() : base("MySqlConnection")
        {

        }

        public DbSet <LogModel> Log { get; set; }

        public IQueryable<LogModel> GetLogs()
        {
            return from log in Log
                   select log;
        }
    }
}

Controlador

public class DbCustomerIds
{
    public List<DbCustomer> GetCustomerIds()
    {
        List<DbCustomer> Customers = new List<DbCustomer>();
        string queryString = "SELECT * FROM dbo.customers";
        SqlDataAdapter adapter = new SqlDataAdapter(queryString, System.Configuration.ConfigurationManager.ConnectionStrings["MySqlConnection"].ConnectionString);
        DataSet customers = new DataSet();
        adapter.Fill(customers, "Customers");

        foreach (DataRow item in customers.Tables[0].Rows)
        {
            DbCustomer cid = new DbCustomer();
            cid.FakeId = Convert.ToInt32(item["Id"]);
            cid.FakeName = Convert.ToString(item["Name"]);
            Customers.Add(cid);
        }
        return Customers;
    }
}

private IEnumerable<SelectListItem> GetCustomerIds()
{
    var DbCustomerIds = new DbCustomerIds();
    var customers = DbCustomerIds
                    .GetCustomerIds()
                    .Select(x =>
                            new SelectListItem
                            {
                                Value = x.FakeId.ToString(),
                                Text = x.FakeName
                            });
        return new SelectList(customers, "Value", "Text");
    }
}

[HttpPost]
    public PartialViewResult LogPartialView(string searchString, string searchString2, string currentFilter, string currentFilterz, int? page, string sortOrder)
    {
        if (Roles.IsUserInRole(WebSecurity.CurrentUserName, "Admin"))
        {
            Customer = GetCustomerIds();
            message = db.GetLogs();
            int pageSize = 10;
            int pageNumber = (page ?? 1);
            var logs = message.OrderByDescending(i => i.timeStamp).ToPagedList(pageNumber, pageSize);
            foreach (var log in logs)
                log.Name = Customer.Where(a => a.Value == log.customerId.ToString()).FirstOrDefault().Text;


        LogModelVM LMVM = new LogModelVM();
        LMVM.Logs = logs;
        LMVM.CustomerList = Customer;
        return PartialView("_LogPartialLayout", LMVM);
    }
LogModelVM LMVM = new LogModelVM();
        LMVM.Logs = logs;
        LMVM.CustomerList = Customer;
        return PartialView("_LogPartialLayout", LMVM);
}

_LogPartialLayout

@model ASDMVC.Models.LogModelVM
@using PagedList.Mvc;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />

@if (Roles.IsUserInRole(WebSecurity.CurrentUserName, "Admin"))
{
    <table class="table">
        <tr>
            <th id="tableth">
                message

            </th>
            <th id="tableth">
                timestamp
            </th>
            <th id="tableth">
                level
            </th>
            <th id="tableth">
                customerId
            </th>
            <th id="tableth">
                customerName
            </th>
        </tr>
        @foreach (var item in Model.Logs)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.message)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.timeStamp)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.level)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.customerId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
            </tr>
        }
    </table>
}
@if (Roles.IsUserInRole(WebSecurity.CurrentUserName, "Member"))
{
    <table class="table">
        <tr>
            <th id="tableth">
                message

            </th>
            <th id="tableth">
                timestamp
            </th>
            <th id="tableth">
                level
            </th>

        </tr>

        @foreach (var item in Model.Logs)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.message)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.timeStamp)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.level)
                </td>
            </tr>
        }
    </table>
}

Page @(Model.Logs.PageCount < Model.Logs.PageNumber ? 0 : Model.Logs.PageNumber) of @Model.Logs.PageCount
@Html.PagedListPager(Model.Logs, page => Url.Action("LogPartialView", 
    new { page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter, currentFilterz = ViewBag.CurrentFilterz }), PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(PagedListRenderOptions.ClassicPlusFirstAndLast,
        new AjaxOptions
        {
            InsertionMode = InsertionMode.Replace,
            HttpMethod = "POST",
            UpdateTargetId = "divLogs"
        }))

Qualquer ajuda seria apreciada, desculpe pela longa pergunta - eu só queria obter todas as informações que parecem relevantes para a situação.

Desde já, obrigado.

Erro atual ao executar:

[InvalidOperationException: o item de modelo passado para o dicionário é do tipo 'PagedList.PagedList`1 [NowasteWebPortalMVC.Models.LogModel]', mas esse dicionário requer um item de modelo do tipo 'NowasteWebPortalMVC.Models.LogModelVM'.]

questionAnswers(1)

yourAnswerToTheQuestion