示例#1
0
        /// <summary>
        ///     Get one by unique key
        /// </summary>
        /// <param name="keyName"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public OrQuery GetOne(string keyName, object value)
        {
            var keyValue = _typeDescription.MakeUniqueKeyValue(keyName, value);

            var query    = new OrQuery(_typeDescription.FullTypeName);
            var andQuery = new AndQuery();

            query.Elements.Add(andQuery);
            andQuery.Elements.Add(new AtomicQuery(keyValue));

            return(query);
        }