public InquiryDbProvider(IDbCommonConnection connection) { if (connection == null) throw new ArgumentNullException("connection"); m_connection = connection; m_loadObjectCommand = new Lazy<DbCommonCommand>(CreateLoadObjectCommand); m_createObjectCommand = new Lazy<DbCommonCommand>(CreateNewObjectCommand); m_editObjectCommand = new Lazy<DbCommonCommand>(CreateEditObjectCommand); m_removeObjectCommand = new Lazy<DbCommonCommand>(CreateRemoveObjectCommand); m_loadPropertyCommand = new Lazy<DbCommonCommand>(CreateLoadPropertyCommand); m_createPropertyCommand = new Lazy<DbCommonCommand>(CreateNewPropertyCommand); m_editPropertyCommand = new Lazy<DbCommonCommand>(CreateEditPropertyCommand); m_removePropertyCommand = new Lazy<DbCommonCommand>(CreateRemovePropertyCommand); m_loadLinkCommand = new Lazy<DbCommonCommand>(CreateLoadLinkCommand); m_createLinkCommand = new Lazy<DbCommonCommand>(CreateNewLinkCommand); m_editLinkCommand = new Lazy<DbCommonCommand>(CreateEditLinkCommand); m_removeLinkCommand = new Lazy<DbCommonCommand>(CreateRemoveLinkCommand); m_loadObjectQueryCommand = new Lazy<DbCommonCommand>(CreateLoadObjectQueryCommand); m_createObjectQueryCommand = new Lazy<DbCommonCommand>(CreateNewObjectQueryCommand); m_editObjectQueryCommand = new Lazy<DbCommonCommand>(CreateEditObjectQueryCommand); m_removeObjectQueryCommand = new Lazy<DbCommonCommand>(CreateRemoveObjectQueryCommand); }
//protected Dictionary<string, DbCommonCommandParameter> m_parameter = new Dictionary<string, DbCommonCommandParameter>(); //public DbCommonCommandParameter this[string code] //{ // get // { // if (!m_parameter.ContainsKey(code)) // throw new EntityObjectException(String.Format("Не найден параметер с кодом '{0}'", code)); // return m_parameter[code]; // } //} //internal void UpdateParameter(string newCode, ObjectQueryParameter parameter) //{ // if (Parameters.Contains(newCode)) // throw new EntityObjectException(); // Parameters.ChangeKey(parameter.Code, newCode, parameter); //} //public DbCommonCommandParameter AddParameter(string code, Type dataType, bool isCollection, object value) //{ // if (m_parameter.ContainsKey(code)) // throw new EntityObjectException(String.Format("Параметер с кодом '{0}' уже существует", code)); // DbCommonCommandParameter result = new DbCommonCommandParameter(code, dataType, value, isCollection); // m_parameter.Add(code, result); // return result; //} //public DbCommonCommandParameter AddParameter(string code, Type dataType, bool isCollection) //{ // return AddParameter(code, dataType, isCollection, null); //} //public DbCommonCommandParameter AddParameter(string code, Type dataType) //{ // return AddParameter(code, dataType, false, null); //} internal ObjectQuery(long id, string code, string objectType, string source, string notes, IDbCommonConnection connection = null) { Id = id; Code = code; ObjectType = objectType; Source = source; Notes = notes; Connection = connection; Parameters = new ObjectQueryParameterCollection(); }
public DomainObjectInquiry(ObjectInquiryProvider provider, IDbCommonConnection connection) { if (provider == null) throw new ArgumentNullException("provider"); m_provider = provider; if (connection == null) throw new ArgumentNullException("connection"); Connection = connection; AObject = m_provider.LoadObject(); ALinks = m_provider.LoadLink(); AQuery = m_provider.LoadQuery(); }
public DomainApplication(DomainObjectInquiry inquiry, IDbCommonConnection connection, DomainObjectFactory objFactory) { if (inquiry == null) throw new ArgumentNullException("inquiry"); m_inquiry = inquiry; if (connection == null) throw new ArgumentNullException("connection"); m_connection = connection; m_documentManager = new DocumentManager(m_inquiry); m_objManager = new DomainObjectManager(m_inquiry, connection, objFactory); DbManager = new DbCommonManager(m_connection); }
public DomainObjectManager(DomainObjectInquiry m_objectInquiry, IDbCommonConnection connection, DomainObjectFactory objectFactory) { if (m_objectInquiry == null) throw new ArgumentNullException("m_objectInquiry"); m_inquiry = m_objectInquiry; if (connection == null) throw new ArgumentNullException("connection"); m_connection = connection; if (objectFactory == null) throw new ArgumentNullException("objectFactory"); ObjectFactory = objectFactory; SharedRepository = new SharedObjectRepository(m_inquiry, objectFactory); Instance = this; }
public DbCommonManager(IDbCommonConnection connection) { Connection = connection; m_dbCommand = new Dictionary<SessionIdentifier, Dictionary<string, DbCommonCommand>>(); PrepareSysDateCommand(); }
public DomainObjectBrokerBuilder(DomainObjectConfig objectConfig, IEnumerable<DomainLinkConfig> links, IDbCommonConnection dbConnection) { m_objectConfig = objectConfig; m_links = links.ToDictionary(link => link.Code); m_dbConnection = dbConnection; }
public DbCommonCommand(string sql, IDbCommonConnection connection = null) { BaseSql = sql; Connection = connection; }
public DomainLinkBrokerBuilder(DomainLinkConfig linkConfig, IDbCommonConnection dbConnection) { m_linkConfig = linkConfig; m_dbConnection = dbConnection; }