public async Task <IActionResult> DeleteInvite(Guid groupId) { // deletes entry from GroupInvites table string uid = User.FindFirst(ClaimTypes.NameIdentifier).Value; var tempInvite = await _context.GroupInvite.Where(x => x.GroupId == groupId && x.UserId == uid).ToListAsync(); _context.Remove(tempInvite[0]); await _context.SaveChangesAsync(); return(RedirectToAction("ListGroups")); }