public DomainLinkBroker(DomainLinkBrokerBuilder brokerBuilder) { m_newItemCommand = new Lazy<DbCommonCommand>(brokerBuilder.GetNewItemCommand); m_deleteItemCommand = new Lazy<DbCommonCommand>(brokerBuilder.GetDeleteItemCommand); }
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; }