public Invoice GetBasketInvoice() { Invoice currentInvoice = new Invoice("CompareInvoiceId", "CompareUserId"); foreach (KeyValuePair<string, Item> itemIdAndItem in GetCurrentItems()) { currentInvoice.InvoiceLines.Add(itemIdAndItem.Key, new InvoiceLine(itemIdAndItem.Key, GetItems()[itemIdAndItem.Key].Description, itemIdAndItem.Value.Quantity)); } return currentInvoice; }
public Dictionary<string, double> GetRecommendedItemsScore(Invoice compareInvoice, int n) { return suggestor.SuggestItems(compareInvoice, n); //return suggestor.GetRecommendedItems(compareInvoice); }
public List<Item> GetRecommendedItems(Invoice compareInvoice, int n) { Dictionary<string, double> recommendedScores = suggestor.SuggestItems(compareInvoice, n); List<Item> recommendedItems = new List<Item>(); foreach (string id in recommendedScores.Keys) { recommendedItems.Add(GetItems()[id]); } return recommendedItems; }