예제 #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());
        }