2010-02-12 4 views
0

Comment mapper cette classe?NHibernate mapping

[Serializable] 
public class AgentSourceCounter 
{ 
    private int agentId; 
    private IDictionary<int, int> sourceCounters; 

    protected AgentSourceCounter() 
    { 
    } 

    public AgentSourceCounter(int agentId, Dictionary<int, int> sourceCounters) 
    { 
     this.agentId = agentId; 
     this.sourceCounters = sourceCounters; 
    } 

    public virtual int AgentId 
    { 
     get { return agentId; } 
     protected set { agentId = value; } 
    } 

    public virtual IDictionary<int, int> SourceCounters 
    { 
     get { return sourceCounters; } 
     set { sourceCounters = value; } 
    } 
} 

à cette table:

agentId int; 
sourceId int; 
hitsCounter int; 

Répondre

1

vous pouvez faire un fichier .hbm.

peut-être le lien ci-dessous vous convient:

NHibernate Mapping