9
实体框架-代码优先-无法存储List <String>
我写了这样的课: class Test { [Key] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public int Id { get; set; } [Required] public List<String> Strings { get; set; } public Test() { Strings = new List<string> { "test", "test2", "test3", "test4" }; } } 和 internal class DataContext : DbContext { public DbSet<Test> Tests { get; set; } …
106
c#
.net
entity-framework