Пример #1
0
        private bool comparator(BookVM arg)
        {
            var filter = Service.getRubrique().Pattern;

            if (!string.IsNullOrEmpty(filter))
            {
                return(arg.Name.ToLower().Contains(filter?.ToLower()));
            }


            return(true);
        }
Пример #2
0
        private bool comparator(BookVM arg)
        {
            var filter = Service.getRubrique().Pattern;

            if (!string.IsNullOrEmpty(filter))
                return arg.Name.ToLower().Contains(filter?.ToLower());

          
            return true;
        }
Пример #3
0
        public static void loadBooks(ICollection<BookVM> Books)
        {

            Random r = new Random();

            for (int i = 0; i < 500; i++)
            {
                BookVM b = new BookVM { Name = "Book N° " + (i + 1), CanAddToBag = true, Rate=r.Next(6), Price = r.NextDouble(), Genre = "Categorie " + (r.Next(11)), ISBN = r.Next(), Auhtors = "Unknown" };
                Books.Add(b);
            }
        }