public async Task <IEnumerable <Models.Category> > GetCategoriesAsync(
     CancellationToken cancellationToken)
 {
     return(await DbConnection
            .QueryAsync <Models.Category>(DatabaseQueryProvider
                                          .GetCommand(DataConstants.GetCategories)));
 }
 public async Task <IEnumerable <Models.Product> > GetProductsAsync(
     string categoryName,
     CancellationToken cancellationToken)
 {
     return(await DbConnection
            .QueryAsync <Models.Product>(DatabaseQueryProvider
                                         .GetCommand(DataConstants.GetProductsByCategoryName,
                                                     new { categoryName })));
 }
 public async Task <IEnumerable <Models.Product> > GetFeaturedProductsAsync(
     DateTime?promotionValidFrom,
     DateTime?promotionValidTo,
     CancellationToken cancellationToken)
 {
     return(await DbConnection
            .QueryAsync <Models.Product>(DatabaseQueryProvider
                                         .GetCommand(DataConstants.GetFeaturedProducts, new {
         promotionValidFrom,
         promotionValidTo
     })));
 }