Exemplo n.º 1
0
 public CopyInfo(BookItem bookItem, int stock, double prize, string currency)
 {
     this.bookItem = bookItem;
     this.stock    = stock;
     this.prize    = prize;
     this.currency = currency;
 }
Exemplo n.º 2
0
        public int FindBookItem(string title, string author)
        {
            BookItem pattern = new BookItem(title, author);
            int      key     = -1;

            foreach (BookItem element in dataContext.books.Values)
            {
                if (element.Equals(pattern))
                {
                    key = dataContext.books.FirstOrDefault(x => x.Value.Equals(pattern)).Key;
                    return(key);
                }
            }
            return(key);
        }