public void Edit(BookVariableInfo bookVariableInfo)
 {
     using (BookMarketDbContext db = new BookMarketDbContext())
     {
         db.EditBookVariableInfo(bookVariableInfo.Id,
             bookVariableInfo.ProductCount, bookVariableInfo.Price);
     }
 }
Exemplo n.º 2
0
 public BookSummary(Book book, BookVariableInfo bookVariableInfo)
     : this(book)
 {
     this.ProductCount = bookVariableInfo.ProductCount;
     this.Price = bookVariableInfo.Price;
 }
Exemplo n.º 3
0
        //Извлечение и создание информации о книге по BookSummary
        public BookVariableInfo MakeBookVariableInfo(
            BookSummary bookSummary, Book book)
        {
            BookVariableInfo bookVariableInfo;

            bookVariableInfo = new BookVariableInfo(){
                Id = book.Id,
                Price = bookSummary.Price,
                ProductCount = bookSummary.ProductCount,
                Book = book
            };
            this._bookVariableInfoRepository.Add(bookVariableInfo);

            return bookVariableInfo;
        }