/// <summary> /// Gets the books. /// </summary> /// <returns></returns> public async Task<IEnumerable<Book>> GetBooks() { var context2 = new BookLibraryEntities(); return await context2.Books.OrderBy(b => b.Name).ToListAsync(); }
/// <summary> /// Initializes a new instance of the <see cref="BookRepository"/> class. /// </summary> /// <param name="context">The context.</param> public BookRepository(BookLibraryEntities context) { this.context = context; }