Cannot use NuGet PagedList ASP.NET MVC # View

后端 未结 7 840
谎友^
谎友^ 2021-02-02 15:24

I can\'t use the following namespace PagedList to use razor @model PagedList.IPagedListin the topmost of view In

7条回答
  •  梦谈多话
    2021-02-02 15:57

    I had the same issue, when I'm using @model

    PagedList.IPagedList

    I get error :

    PagedList.IPagedList<> does not contain a definition for ....

    Solution :

    In View -> Index.cshtml
    Replace model.Code with model.First().Code

    • Just Add First() before all properties.

提交回复
热议问题