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

                return authors.ToList();
            }
        }
Exemple #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());
            }
        }
Exemple #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();
            }
        }
Exemple #4
0
        public static List <Author> GetAuthors()
        {
            using (var db = new BooksDB())
            {
                var authors = db.Authors;


                return(authors.ToList());
            }
        }