I have two classes Order and Items
I want a method like this
class Order
{
public virtual IList<Item> GetItems(Order order)
{
//get items for that order.
}
}
class Item
{
public virtual IList<Order> GetOrders(Item item)
{
//get all the orders in which that items is present.
}
}
Is it write to create a method like this or instead should I create a property
public virtual IList<Item> Items { get; set; }
And how should I do the mapping for this is nhibernate??