Пример #1
0
        public IQueryAction Eq(Type value)
        {
            if (value == null)
            {
                throw new ArgumentNullException("value", "Class cannot be null or undefined");
            }

            if (value == typeof(ContentItem) || value.IsAbstract || value.IsInterface)
            {
                query.Criterias.Add(new PropertyInHqlProvider <string>(op, "class", query.GetDiscriminators(value).ToArray()));
            }
            else
            {
                query.Criterias.Add(new PropertyHqlProvider <string>(op, "class", Comparison.Equal, query.GetDiscriminator(value)));
            }
            return(query);
        }
Пример #2
0
 public IQueryAction Eq(Type value)
 {
     query.Criterias.Add(new PropertyHqlProvider <string>(op, "class", Comparison.Equal, query.GetDiscriminator(value)));
     return(query);
 }