protected override void List() { foreach (Author author in _authorDao.GetAll()) { _ui.PrintLn(author); } }
protected override void Add() { _ui.PrintLn("Authors:"); foreach (var a in _authorDao.GetAll()) { _ui.PrintLn(a); } int authorId = _ui.ReadInt("Author ID", 0); Author author = _authorDao.Get(authorId); if (author == null) { _ui.PrintLn("Author was not found!"); return; } string title = _ui.ReadString("Title", "Z"); _bookDao.Add(new Book(author, title)); }
public IEnumerable <Author> GetAll() { return(_authorDao.GetAll()); }
public ICollection <Author> GetAll() { return(authors.GetAll().ToList()); }
public List <Author> GetAll() { var listAuthors = _authorDao.GetAll(); return(listAuthors.ToList()); }