public async Task <JsonResult> GetProducts(Enums.ProductStatus status)
        {
            try
            {
                var products = await _productService.GetAll(status);

                return(Json(new { success = true, result = products }));
            }
            catch (Exception ex)
            {
                return(Json(new { success = false, result = ex.Message }));
            }
        }
 public async Task <List <Product> > GetAll(Enums.ProductStatus status)
 {
     return(await _db.Products.Where(x => x.Status == status).OrderByDescending(x => x.Id).ToListAsync());
 }