The model item passed into the dictionary is of type 'System.Data.Entity.Infrastructure.DbQuery', but this dictionary requires a model item of type B

前端 未结 5 1554
太阳男子
太阳男子 2020-12-18 13:16

I been stuck in a situation and I tried finding the solution for it on net but was not successful. I am new to MVC with Entity Framework, and it is throwing the exception wh

5条回答
  •  情书的邮戳
    2020-12-18 14:05

    Add a new object or instance with the correct type

    @Html.Partial("_LoginPartial", new MVCTest.Models.LoginViewModel())

提交回复
热议问题