2

Location を表すオブジェクトがあります。場所には他の場所を含めることができます。Fluent NHibernate とのこの関係をどのように表すことができますか。クラスは次のようになります。

public class Location : EntityBase
{
    #region Properties
    public string LocationName { get; set; }
    public Location ParentLocation { get; private set; }

    private List<Location> _locations = new List<Location>();
    public IEnumerable<Location> Locations
    {
        get { return _locations; }
    }

    private List<Device> _devices = new List<Device>();
    public IEnumerable<Device> Devices
    {
        get { return _devices; }
    }

    #endregion
    //Other logic omitted
}

ありがとう。

4

1 に答える 1