using Gremlin.GremlinData.EntityClasses;
using System.Collections.Generic;

namespace Gremlin.Operations
{
    public class CustomDescriptionOperations
    {
        public static CustomDescription SearchForProducts(LineItem angebot, List<CustomDescription> customDescriptions)
        {
            List<CustomDescription> resultCustomDescriptions = customDescriptions.FindAll(customDescription => customDescription.ProductNumber == angebot.ProductNumber);
            return resultCustomDescriptions.Find(customDescription => customDescription.OptionNumber == angebot.OptionNumber);
        }
    }
}