protected override void OnInitialize() { base.OnInitialize(); Rejects = Begin.Concat(End) .Do(_ => IsLoading.Value = true) .Select(_ => RxQuery(s => { var begin = Begin.Value; var end = End.Value.AddDays(1); var result = s.Query <Reject>() .Where(r => r.LetterDate >= begin && r.LetterDate < end) .OrderBy(r => r.LetterDate) .ToList(); return(result); })) .Switch() .Do(_ => IsLoading.Value = false) .ToValue(CloseCancellation); }