using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.ActiveRecord;

namespace ManyToManyExample
{
    [ActiveRecord]
    public class Kategoria : ActiveRecordBase
    {
        public Kategoria() { L_Ksiazka = new List<Ksiazka>(); }

        [PrimaryKey]
        public int ID { get; set; }

        [Property]
        public string Nazwa { get; set; }

        [HasAndBelongsToMany( typeof( Ksiazka ), Table = "KsiazkaKategoria", ColumnKey = "ID_Kategoria", ColumnRef = "ID_Ksiazka" )]
        public IList<Ksiazka> L_Ksiazka { get; set; }
    }
}
