Esempio n. 1
0
        public static JsonWhere Where(Type itemType, string condition, params object[] values)
        {
            var whereWhere = new JsonWhere(itemType);

            whereWhere.And(condition, values);
            return(whereWhere);
        }
Esempio n. 2
0
 public JsonCommand Delete()
 {
     if (_currentWhere != null)
     {
         _filters.Add(new JsonFilter(_currentWhere));
     }
     _currentWhere = new JsonWhere(_itemType);
     _commandType  = JsonCommandType.Delete;
     return(new JsonCommand(_itemType));
 }
Esempio n. 3
0
 public JsonCommand Insert(object item)
 {
     if (_currentWhere != null)
     {
         _filters.Add(new JsonFilter(_currentWhere));
     }
     _currentWhere = new JsonWhere(_itemType);
     _commandType  = JsonCommandType.Insert;
     _item         = item;
     return(new JsonCommand(_itemType));
 }
Esempio n. 4
0
        public JsonCommand From <TMaster, TDetail>(Expression <Func <TMaster, IList <TDetail> > > listGetter)
        {
            if (_currentWhere != null)
            {
                _filters.Add(new JsonFilter(_currentWhere));
            }
            var from = JsonFrom.From(listGetter);

            _filters.Add(new JsonFilter(from));
            _currentWhere = new JsonWhere(typeof(TDetail));
            return(this);
        }
Esempio n. 5
0
 public JsonFilter(JsonWhere where)
 {
     _where = where;
 }
Esempio n. 6
0
 public JsonCommand(Type itemType)
 {
     _currentWhere = new JsonWhere(itemType);
     _itemType     = itemType;
 }