1
I did that lambda
OfferUri = OfferUri.Select(s => s.Items.Where(a => a.SubscriptionId == s.Id).Select(n => n.Id).FirstOrDefault()).ToString()
and when I see what she returns to me, I have it on the property
SELECT
CASE WHEN ([Project5].[C1] IS NULL)
THEN 0 ELSE [Project5].[C2]
END AS [C1]
FROM ( SELECT
[Project3].[C1] AS [C1],
(SELECT TOP (1)
[Extent3].[Id] AS [Id]
FROM [dbo].[SubscriptionItem] AS [Extent3]
WHERE ([Project3].[Id] = [Extent3].[SubscriptionId])
AND ([Extent3].[SubscriptionId] = [Project3].[Id])) AS [C2]
FROM ( SELECT
[Project2].[Id] AS [Id],
[Project2].[C1] AS [C1]
FROM ( SELECT
[Extent1].[Id] AS [Id],
(SELECT TOP (1)
[Extent2].[Id] AS [Id]
FROM [dbo].[SubscriptionItem] AS [Extent2]
WHERE ([Extent1].[Id] = [Extent2].[SubscriptionId])
AND ([Extent2].[SubscriptionId] = [Extent1].[Id])) AS [C1]
FROM [dbo].[Subscription] AS [Extent1]
WHERE [Extent1].[OrderId] = 4661 ) AS [Project2] ) AS [Project3]) AS [Project5]
running in the bank get this
C1
---
3845
3848
What I would like to know is how to return these last values in the property and not the query
EDIT1
The whole point is that when I run this query
var csp = OfferUri.Select(s => s.Items.AsEnumerable().Where(a => a.SubscriptionId == s.Id).Select(n => n.CspSubscriptions.Where(sel => sel.OriginSubscriptionItemId == n.Id).Select(r => r.OfferUri))).FirstOrDefault().ToString();
I pick this up
System.Collections.Generic.List`1[System.Collections.Generic.IEnumerable`1[System.String]]
and should take this
031C9E47-4802-4248-838E-778FB1D2CC05
A6C5A400-70B4-458F-AAF9-DADE77A70418
That’s the problem I’m going through, I can’t bring the value of query execution.
That GUID you want is inside the field
id
table?– Marcelo Shiniti Uchimura