예제 #1
0
 public DomainLinkBroker(DomainLinkBrokerBuilder brokerBuilder)
 {
     m_newItemCommand = new Lazy<DbCommonCommand>(brokerBuilder.GetNewItemCommand);
     m_deleteItemCommand = new Lazy<DbCommonCommand>(brokerBuilder.GetDeleteItemCommand);
 }
예제 #2
0
        public DomainLinkBroker GetLinkBroker(DomainLinkKey linkKey)
        {
            DomainLinkBroker result = null;
            if (m_domainLinkBroker.TryGetValue(linkKey, out result))
                return result;

            var query = from link in m_inquiry.ALinks
                        where link.Key.Equals(linkKey)
                        select link;

            DomainLinkBrokerBuilder brokerBuilder = new DomainLinkBrokerBuilder(query.First(), m_connection);
            result = new DomainLinkBroker(brokerBuilder);
            m_domainLinkBroker.Add(linkKey, result);

            return result;
        }