我的模型看起来像这样:
public class Product
{
public string Name {get; set;}
public string Description {get; set;}
public double Price {get; set;}
public List<string> Features {get; set;}
}
Run Code Online (Sandbox Code Playgroud)
我希望我的数据库表是平的 - 列表应该存储为分隔字符串:功能一|功能二|功能三例如.
从db中检索时,它应将每个项目放回List中
这可能吗?