List<Story>
中有错误:
the type or namespace name 'List<>' could not be found (are you missing a using directive or an assembly reference?) (CS0246) [project]
using System;
using project.Models;
namespace project.Models
{
public class Genre
{
public int GenreId { get; set; }
public string Name { get; set; }
public List<Story> Stories { get; set; }
}
}
最佳答案
您缺少 using 语句 using System.Collections.Generic;
关于c# - 模型中的 MVC List<> 错误引用了另一个模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58661304/