コード例 #1
0
        public IDeleteResponse DeleteFriend([FromBody] DeleteFrnd frnd)
        {
            int count = 0;

            if (frnd.User_from != null && frnd.User_to != null)
            {
                count = Friends.Delete(frnd.User_from, frnd.User_to);
            }

            return(new DeleteResponse()
            {
                AffectedRecords = count
            });
        }
コード例 #2
0
ファイル: Movies.cs プロジェクト: antoine3990/BDFI
        public void ClearFriendList(Friends Friends)
        {
            bool checkForMore;

            do
            {
                List <Friend> FriendsList = Friends.ToList();
                checkForMore = false;
                foreach (Friend Friend in FriendsList)
                {
                    if (this.Id == Friend.ContactId)
                    {
                        Friends.Delete(Friend.Id);
                        checkForMore = true;
                        break;
                    }
                }
            } while (checkForMore);
        }