Click here to Skip to main content
15,443,549 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Written a query in postgresql but facing problem while writing into entity framework.
See my query below:

What I have tried:

C."DetailedDescription" , S."DemoVideoTypeUId", S."DemoVideo",
        ( SELECT json_agg( row_to_json(B))  AS "Feature" FROM (
        SELECT DISTINCT "FeatureTitle", "FeatureDescription"
        FROM catalogueservices."AssetFeature" 
        WHERE  "AssetVersionUId" = V."AssetVersionUId" AND "AssetUId" = V."AssetUId"
         ) AS "Feature",
        ( SELECT json_agg(row_to_json(B))FROM (
        SELECT DISTINCT "AssetOutcomeOrBenefitUId",
                ( SELECT DISTINCT "MasterListItemValue" FROM catalogueservices."MasterListItem" 
                             WHERE "MasterListItemUId" = "OutcomeTypeUId") AS "OutcomeType",
      "OutcomeValue", "OutcomeDesc", "Tagwords"
        FROM catalogueservices."AssetOutcomeOrBenefit" 
        WHERE "AssetVersionUId" = V."AssetVersionUId"
       ) AS "Benefit",
       ( SELECT json_agg( row_to_json(B))  AS "Feature" FROM (
        SELECT DISTINCT A."DisplayName", A."EmailId", R."RoleName"
        FROM catalogueservices."AssetContact" A
        JOIN catalogueservices."Role" R ON A."RoleUId" = R."RoleUId"
        WHERE A."AssetUId" = C."AssetUId" -->AND A."AssetVersionUId" = V."AssetVersionUId"
         ) AS "Contact",
       CS."AssetImagePath", CS."AssetImageBinary" ,
       CS."AssetImageTypeUId" , Q."Comments" 
 from catalogueservices."AssetDetails" C
 JOIN catalogueservices."AssetVersion" V ON C."AssetUId"= V."AssetUId" 
 left JOIN catalogueservices."AssetImage" CS ON C."AssetUId"= CS."AssetUId" 
 left JOIN catalogueservices."AssetDemoVideo" S ON C."AssetUId" = S."AssetUId"
 left JOIN catalogueservices."DemoVideoSection" Q ON S."AssetDemoVideoUId"= Q."AssetDemoVideoUId"

  where C."AssetId"= '19'
and V."AssetVersionId"='22'
Updated 23-Jul-21 19:46pm
Richard MacCutchan 23-Jul-21 15:11pm    
What problem?
Member 10546331 26-Jul-21 6:04am    
not able to write it in linq join condition giving error of not found
Richard MacCutchan 26-Jul-21 6:14am    
So, somewhere something is not found, and you expect us to guess what, where and why.
Gerry Schmitz 24-Jul-21 12:51pm    
Has zero to do with Entity Framework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900