0
我需要實現這種關係:LINQ to SQL,如何爲一個表創建一對多的關係?
- 每個文件夾可以包含許多文件夾裏面。
- 每個文件夾可以在一個父文件夾內。許多其他文件夾
裏面的文件夾的
folder
。我怎樣才能應用這些關係?謝謝。 [Table]
public class Folder
{
private int id;
[Column(DbType = "INT NOT NULL IDENTITY", IsDbGenerated = true, IsPrimaryKey = true)]
public int Id
{
get { return id; }
set
{
id = value;
}
}
private string name;
[Column]
public string Name
{
get
{
return name;
}
set
{
if (value != name)
{
name = value;
}
}
}
}