我正在开发一个具有 _ViewImport.cshtml 的 dotnet Web 应用程序,但在视图中产品模型给出了错误
_ViewImport.cshtml 内容
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@using Microsoft.AspNetCore.Identity
@using System.Security.Claims
@using IdentityApp.Models
Views/Home/Index.cshtml 中的索引视图
@model IQueryable<Product>
<h4 class="bg-primary text-white text-center p-2">MVC - Level 1 - Anyone</h4>
<div class="text-center">
<h6 class="p-2">The store contains @Model.Count() products.</h6>
</div>