Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. Sub Query In Linq

Sub Query In Linq

Scheduled Pinned Locked Moved LINQ
linqcsharpdatabasehelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KMM3F
    wrote on last edited by
    #1

    Hi. I have write linq query using contains but it gives an errror My query is var subId = from a in MyConnection.AccMst.MENU_TREE_STRUCTUREs where a.MTS_SUBID == null select new { a.MTS_ID }; var query = from m in MyConnection.AccMst.MENU_TREE_STRUCTUREs join u in MyConnection.AccMst.USER_RIGHT_DETAILs on m.MTS_ID equals u.URD_MTS_GUID join r in MyConnection.AccMst.USER_RIGHT_MASTERs on u.URD_URM_ID equals r.URM_ID where r.URM_RM_ID == Convert.ToDecimal(ddlRoleDesc.SelectedValue) && subId.Contains(m.MTS_ID) && r.URM_CM_COMP_CODE == Convert.ToDecimal(SessionClass.CompanyCode) select new { m.MTS_ID, u.URD_ACCESS }; Error:The type arguments for method 'System.Linq.Queryable.Contains(System.Linq.IQueryable, TSource)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups