public async Task<List<Award>> SearchAwards(AwardsSearchingCriteria criteria, int pageNr, int pageAmount)
 {
     using (var context = new AF_Context())
     {
         try
         {
             var skip = pageAmount * (pageNr - 1);
             var query = (from a in context.Awards select a).Include(a => a.Play).Include(a => a.Category);
             if (criteria.FestivalIdFilter != null)
                 query = query.Where(a => a.Play.FestivalId == criteria.FestivalIdFilter);
             if (!String.IsNullOrEmpty(criteria.Author))
                 query = query.Where(a => a.Play.Author.Contains(criteria.Author));
             if (!String.IsNullOrEmpty(criteria.Title))
                 query = query.Where(a => a.Play.Title.Contains(criteria.Title));
             if (criteria.CategoryIdFilter != null)
                 query = query.Where(a => a.CategoryId==criteria.CategoryIdFilter);
             return
                 await
                     (query.OrderBy(a => a.Play.FestivalId)
                         .ThenBy(a => a.Category.Group)
                         .ThenBy(a => a.Category.Order)
                         .Skip(skip)
                         .Take(pageAmount)
                         .ToListAsync());
         }
         catch (Exception ex)
         {
             throw ex;
         }
         return null;
     }
 }
 public MainViewModel()
 {
     PlaysCriteria = new PlaysSearchingCriteria();
     PeopleCriteria = new PeopleSearchingCriteria();
     AwardsCriteria = new AwardsSearchingCriteria();
 }
 public async Task<List<Award>> SearchAwards(AwardsSearchingCriteria criteria, int pageNr, int pageAmount)
 {
     return await DataAccess.SearchAwards(criteria, pageNr, pageAmount);
 }