public HttpResponseMessage GetAllLibraryBooksForACategory(LibraryBookCategory category) { var libraryService = new LibraryService(); IEnumerable<ILibraryBook> books = libraryService.AllBooks(category); return Request.CreateResponse(HttpStatusCode.OK, books); }
private bool IsNonFiction(LibraryBookCategory category) { switch (category) { case LibraryBookCategory.Biography: return(true); default: return(false); } }
public IEnumerable <ILibraryBook> GetAllLibraryBooksForACategory(LibraryBookCategory category) { return(_libraryService.AllBooks(category)); }
public IEnumerable <ILibraryBook> AllBooks(LibraryBookCategory category) { return(_books.Where(lb => lb.Category == category)); }
public IEnumerable<ILibraryBook> AllBooks(LibraryBookCategory category) { return _books.Where(lb => lb.Category == category); }