using linq not exists vb.net

Posted on 2011-10-27
Medium Priority
Last Modified: 2012-05-12

I have the following function that I cant quite get right as am still relatively new to linq:

Basically the costume group that is being passed in has a property costumes

The generalhelper.costumes returns a linq.tables(of costumes), the same as the costumes property on group.

What I want to say is get the generalhelper.costumes that dont exist in group.costumes.

How dod I do this.

Can the code be in vb.net please.

Public Function GetCostumesNotLinkedToGroup(ByVal group As CostumeGroup) As ....
            Dim query = GeneralHelper.Costumes.Where....
            Return query
        Catch ex As Exception
        End Try
    End Function

Open in new window

Question by:scm0sml
LVL 17

Assisted Solution

nepaluz earned 400 total points
ID: 37039071
Dim query = From x As Costume in GeneralHelper.Costumes() Not Where group.Costume.Contains(x) Select x
Return query

Open in new window

LVL 75

Accepted Solution

käµfm³d   👽 earned 1600 total points
ID: 37039105

Dim query = GeneralHelper.Costumes.Except(group.Costumes)

Open in new window


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question