public Task getAuthorNames(HttpContext context) { bookController bookC = new bookController(); var book = bookC.searchBook(); return(context.Response.WriteAsync(book[0].getAuthorNames())); }
public Task resultToString(HttpContext context) { bookController bookC = new bookController(); var book = bookC.searchBook(); return(context.Response.WriteAsync(book[0].ToString())); }
public Task NameBook(HttpContext context) { bookController bookC = new bookController(); var book = bookC.searchBook(); return(context.Response.WriteAsync(book[0].name)); }
public Task sendHTML(HttpContext context) { bookController bookC = new bookController(); var book = bookC.searchBook(); var html = $"<pre style='color:blue'>{book[0].ToString()}</pre>"; return(context.Response.WriteAsync(html)); }
public void readBookCsv() { try{ bookController bookC = new bookController(); var Books = bookC.searchBook(); Console.WriteLine("Success"); } catch (IOException e) { Console.WriteLine("Failed"); throw; } }
public void viewBooks() { try { Console.WriteLine("Success"); bookController bookC = new bookController(); var Books = bookC.searchBook(); Console.WriteLine("Success"); foreach (var book in Books) { Console.WriteLine($" book ToString "); Console.WriteLine(book.ToString()); Console.WriteLine($" getAuthorNames | {book.getAuthorNames()}"); } } catch (IOException e) { Console.WriteLine("Failed"); throw; } }