相关疑难解决方法(0)

使用Fluent NHibernate将List <string>映射到分隔的字符串

我的模型看起来像这样:

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中

这可能吗?

c# fluent-nhibernate

7
推荐指数
1
解决办法
3266
查看次数

标签 统计

c# ×1

fluent-nhibernate ×1