Exemplo n.º 1
0
        public async Task <IActionResult> Exclude(int?id)
        {
            var excluded = await _context.FitnessAndMembers.Where(x => x.MemberId == id).ToListAsync();

            _context.RemoveRange(excluded);
            await _context.SaveChangesAsync();

            return(RedirectToAction(nameof(Index)));
        }