Beispiel #1
0
        public async Task OnGetAsync()
        {
            Boats = await _context.Boats.ToListAsync();

            Boat   = Boats.Where(b => b.BoatId == BoatId).FirstOrDefault();
            People = await _context.Persons.ToListAsync();

            Berths = await _context.Berths.ToListAsync();
        }
 private void Search(string searchquery)
 {
     if (!string.IsNullOrWhiteSpace(searchquery))
     {
         Boatlist = Boats.Where(b =>
                                b.PersonNavigation.FullName.ToLower().Contains(searchquery.ToLower()) ||
                                b.Name.ToLower().Contains(searchquery.ToLower()) ||
                                b.Type.ToLower().Contains(searchquery.ToLower())
                                ).ToList();
     }
     else
     {
         Boatlist = new List <Boat>();
     }
 }