Пример #1
0
 protected override void List()
 {
     foreach (Author author in _authorDao.GetAll())
     {
         _ui.PrintLn(author);
     }
 }
Пример #2
0
        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));
        }
Пример #3
0
 public IEnumerable <Author> GetAll()
 {
     return(_authorDao.GetAll());
 }
Пример #4
0
 public ICollection <Author> GetAll()
 {
     return(authors.GetAll().ToList());
 }
Пример #5
0
        public List <Author> GetAll()
        {
            var listAuthors = _authorDao.GetAll();

            return(listAuthors.ToList());
        }