public IEnumerable <StockListDto> GetAllStockProducts() { var result = _stockDAO.GetAllProductStocks(); if (result == null) { return(null); } return(result.AsEnumerable().Select(row => new StockListDto { Id = row.Field <int>(0), ProductId = row.Field <int>(1), Quantity = row.Field <int>(2), LastUpdated = row.Field <DateTime>(3), ProductCode = row.Field <string>(4), ProductName = row.Field <string>(5), ProductUnitPrice = row.Field <decimal>(6) }).ToList()); }