public List <CeremonyViewModel> Search(CeremonySearchModel searchModel) { var query = _hContext.Ceremonies.Include(x => x.CeremonyGuests).ThenInclude(x => x.Guest).Select(x => new CeremonyViewModel { Id = x.Id, Title = x.Title, CeremonyDate = x.CeremonyDate.ToFarsi(), IsLive = x.IsLive, Image = x.Image, }); if (!string.IsNullOrWhiteSpace(searchModel.Title)) { query = query.Where(x => x.Title.Contains(searchModel.Title)); } return(query.OrderByDescending(x => x.Id).ToList()); }
public List <CeremonyViewModel> Search(CeremonySearchModel searchModel) { return(_ceremonyRepository.Search(searchModel)); }
public List <CeremonyViewModel> Search(CeremonySearchModel searchModel) { throw new NotImplementedException(); }
public void OnGet(CeremonySearchModel searchModel) { Ceremonies = _ceremonyApplication.Search(searchModel); }