Example #1
0
        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));
 }
Example #3
0
 public List <CeremonyViewModel> Search(CeremonySearchModel searchModel)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public void OnGet(CeremonySearchModel searchModel)
 {
     Ceremonies = _ceremonyApplication.Search(searchModel);
 }