/// <summary> /// Create a new Book object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="categoryId">Initial value of the CategoryId property.</param> /// <param name="aSIN">Initial value of the ASIN property.</param> /// <param name="title">Initial value of the Title property.</param> /// <param name="author">Initial value of the Author property.</param> /// <param name="description">Initial value of the Description property.</param> /// <param name="publishDate">Initial value of the PublishDate property.</param> /// <param name="addedDate">Initial value of the AddedDate property.</param> public static Book CreateBook(global::System.Int32 id, global::System.Int32 categoryId, global::System.String aSIN, global::System.String title, global::System.String author, global::System.String description, global::System.DateTime publishDate, global::System.DateTime addedDate) { Book book = new Book(); book.Id = id; book.CategoryId = categoryId; book.ASIN = aSIN; book.Title = title; book.Author = author; book.Description = description; book.PublishDate = publishDate; book.AddedDate = addedDate; return book; }
public BookViewModel(Book book, IEnumerable<FlaggedBook> flaggedBooksForUser) { Book = book; FlaggedBook = flaggedBooksForUser.FirstOrDefault(b => b.BookId == book.Id); }
/// <summary> /// Deprecated Method for adding a new object to the Books EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToBooks(Book book) { base.AddObject("Books", book); }
public BookViewModel() { Book = new Book(); FlaggedBook = new FlaggedBook(); }