Esempio n. 1
0
        public async Task <ActionResult> DeleteMember(string watchlistId, string entityId, bool isLastItem)
        {
            var removeMemberResult = await _watchlistService.DeleteWatchlistMembersAsync(req =>
            {
                req.UserId      = UserId;
                req.WatchlistId = watchlistId;
                req.AddExternalMember(entityId);
                req.DeleteParentWatchlist = isLastItem;
            });

            if (isLastItem && removeMemberResult.HttpStatusCode == HttpStatusCode.OK)
            {
                return(RedirectToAction("Index", new { deleted = true }));
            }

            return(RedirectToAction("Edit", new { WatchlistId = watchlistId }));
        }