Esempio n. 1
0
        public static List<Author> GetAuthors()
        {
            using (var db = new BooksDB())
            {
                var authors = db.Authors;

                return authors.ToList();
            }
        }
Esempio n. 2
0
        public static List <Author> GetAuthorByChar(string userInput)
        {
            using (var db = new BooksDB())
            {
                var authors = db.Authors.Where(a => a.FirstName.StartsWith(userInput) || a.LastName.StartsWith(userInput));

                return(authors.ToList());
            }
        }
Esempio n. 3
0
        public static List<Author> GetAuthorByChar(string userInput)
        {
            using (var db = new BooksDB())
            {
                var authors = db.Authors.Where(a => a.FirstName.StartsWith(userInput) || a.LastName.StartsWith(userInput));

                return authors.ToList();
            }
        }
Esempio n. 4
0
        public static List <Author> GetAuthors()
        {
            using (var db = new BooksDB())
            {
                var authors = db.Authors;


                return(authors.ToList());
            }
        }