Exemplo n.º 1
0
        public async Task <Response <TrendingProduct> > AddTrendingProduct(TrendingProduct trendingProduct)
        {
            var httpResponse = new Response <TrendingProduct>();

            try
            {
                httpResponse.RequestState = true;
                httpResponse.ErrorState   = !await _productManager.AddTrendingProduct(trendingProduct);
            }
            catch (Exception ex)
            {
                httpResponse.ErrorState = true;
                httpResponse.ErrorList.Add(ex.Adapt <ApiException>());
            }
            return(httpResponse);
        }