public List <ProductCatalogDTO> GetList() { var values = repository.GetList(); List <ProductCatalogDTO> result = new List <ProductCatalogDTO>(); foreach (var value in values) { result.Add(new ProductCatalogDTO { ID = value.ID, Name = value.Name, Color = value.Color, Description = value.Description, Quantity = value.Quantity, SubCategory = value.SubCategory, PhotoID = value.PhotoID, Price = value.Price }); } return(result); }