private ICommand Backward(XTable table, ICommand command) { BackwardCommand cmd = (BackwardCommand)command; List <KeyValuePair <IData, IData> > list = new List <KeyValuePair <IData, IData> >(); foreach (var item in table.Backward(cmd.FromKey, cmd.FromKey != null, cmd.ToKey, cmd.ToKey != null).Take(cmd.PageCount)) { list.Add(item); } return(new BackwardCommand(cmd.PageCount, cmd.FromKey, cmd.ToKey, list)); }