Пример #1
0
        public static List<Author> GetAuthors()
        {
            using (var db = new BooksDB())
            {
                var authors = db.Authors;

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


                return(authors.ToList());
            }
        }