Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="descriptor"></param>
        /// <returns></returns>
        public IDbQueryContract CreateDbQueryContract(IEntryDescriptor descriptor)
        {
            var _contractBuilder = new DbQueryContractBuilder();

            _contractBuilder.Name                 = descriptor.Name;
            _contractBuilder.Schema               = DbQueryContract.QUERYTEXT_SCHEMA;
            _contractBuilder.Namespace            = descriptor.Namespace;
            _contractBuilder.QueryAction          = QueryAction;
            _contractBuilder.IsElementContainable = descriptor.IsListType;

            return(_contractBuilder.GetDbQueryContract());
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="descriptor"></param>
        /// <param name="queryContract"></param>
        /// <returns></returns>
        public IDbQueryContract CreateDbQueryContract(IEntryDescriptor descriptor, IDbQueryContract queryContract)
        {
            var _contractBuilder = new DbQueryContractBuilder();

            _contractBuilder.Name                    = string.IsNullOrEmpty(queryContract.Name) ? descriptor.Name : queryContract.Name;
            _contractBuilder.Schema                  = string.IsNullOrEmpty(queryContract.Schema) ? DbQueryContract.QUERYTEXT_SCHEMA : queryContract.Schema;
            _contractBuilder.Namespace               = descriptor.Namespace;
            _contractBuilder.Abbreviation            = queryContract.Abbreviation;
            _contractBuilder.QueryAction             = QueryAction;
            _contractBuilder.IsElementContainable    = descriptor.IsListType;
            _contractBuilder.OmitsAbbreviationNaming = queryContract.OmitsAbbreviationNaming;

            return(_contractBuilder.GetDbQueryContract());
        }