public virtual PageSearchDto <TEntityDto> PageSearch(TSearch search) { var query = _getAll.GetAll().AsNoTracking(); if (SearchFilter(search) != null) { query = query.Where(SearchFilter(search)); } query = OrderFilter() != null ? query.OrderByDescending(OrderFilter()) : query.OrderByDescending(item => item.Id); var total = query.Count(); var result = query.Skip(search.PageSize * (search.PageIndex - 1)) .Take(search.PageSize) .ToList(); return(new PageSearchDto <TEntityDto>() { EntityDtos = ConvertToEntities(result), Total = total }); }
public HomePageViewModel(INavigationService navigationService, IGetAll <Video> getAllVideoRepo) : base(navigationService) { this._navigationService = navigationService; this._getAllVideoRepo = getAllVideoRepo; Title = "Home"; Videos = _getAllVideoRepo.GetAll(); IsDarkModeOn = (App.Current.Resources.Source.OriginalString == "Themes/DarkTheme.xaml"); }
private async Task getAllCoinsExecute() { IsDataStillLoading = true; Coins = _dummyCoinsData; var coinRequest = await _getAllCoinsService.GetAll(); if (coinRequest.IsFailed) { Coins = null; IsEmpty = true; } else { _coinsForFilter = coinRequest.Data; Coins = coinRequest.Data; IsSearchBoxEnable = true; } IsDataStillLoading = false; }
public override void Init(object initData) { base.Init(initData); Contacts = _igetAllContacts.GetAll(); }
public Task <IEnumerable <TEntity> > Handle(GetEntitiesQuery <TEntity> request, CancellationToken cancellationToken) { return(Task.FromResult(_svc.GetAll())); }
public IEnumerable <T> GetAll <T>() { return(allGetter.GetAll <T>()); }