Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You stated: I have a list of strings (converted from Guid) ...</p> <p>Can you NOT convert them into strings and keep it as a List&lt; System.Guid>?? Then you can do this (assuming PendingIdGuidList is List&lt; System.Guid>:</p> <pre><code>var regionRequets = (from r in db.course_requests join p in PendingIdGuidList on u.request_state equals p select r).ToList(); </code></pre> <p>Edited to add:</p> <p>I ran a test on this using the following code:</p> <pre><code>var db = new EntityModels.MapleCreekEntities(); List&lt;System.Guid&gt; PendingIdGuidList = new List&lt;System.Guid&gt;() { System.Guid.Parse("77dfd79e-2d61-40b9-ac23-36eb53dc55bc"), System.Guid.Parse("cd409b96-de92-4fd7-8870-aa42eb5b8751") }; var regionRequets = (from r in db.Users join p in PendingIdGuidList on r.Test equals p select r).ToList(); </code></pre> <p>Users is a table in my database. I added a column called Test as a Uniqueidentifier data type, then modified 2 records with the following Guids.</p> <p>I know it's not exactly a 1:1 of what the OP is doing, but pretty close. Here is the profiled SQL statement:</p> <pre><code>SELECT [Extent1].[ID] AS [ID], [Extent1].[UserLogin] AS [UserLogin], [Extent1].[Password] AS [Password], [Extent1].[Test] AS [Test] FROM [dbo].[Users] AS [Extent1] INNER JOIN (SELECT cast('77dfd79e-2d61-40b9-ac23-36eb53dc55bc' as uniqueidentifier) AS [C1] FROM ( SELECT 1 AS X ) AS [SingleRowTable1] UNION ALL SELECT cast('cd409b96-de92-4fd7-8870-aa42eb5b8751' as uniqueidentifier) AS [C1] FROM ( SELECT 1 AS X ) AS [SingleRowTable2]) AS [UnionAll1] ON [Extent1].[Test] = [UnionAll1].[C1] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload