Example #1
0
        public async Task <List <Bracelet> > GetBraceletbyType(Bracelet.BraceletTypes type)
        {
            List <Bracelet> brc = new List <Bracelet>();

            using (var context = new BlackPDbContext())
            {
                brc = await context.Bracelets
                      .Where(b => b.BraceletType == type)
                      .ToListAsync();
            }

            return(brc);
        }
        public async Task <IActionResult> OnGetByTypeAsync(Bracelet.BraceletTypes type)
        {
            bracelets = await braceletService.GetBraceletbyType(type);

            return(Page());
        }