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. linq query error

linq query error

Scheduled Pinned Locked Moved LINQ
databasehelpcsharplinq
3 Posts 2 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.
  • H Offline
    H Offline
    haseeb_saeed
    wrote on last edited by
    #1

    hi, i am using the following linq query against a view of two joined (inner) tables and it throws an error. i have pasted both below. Please provide help: var q = from a in db.GetTable() where a.model_id=id select a; throws an error: cannot convert implicitly to type int to bool Why is it throwing this error...Please help best regards

    haseeb

    V 1 Reply Last reply
    0
    • H haseeb_saeed

      hi, i am using the following linq query against a view of two joined (inner) tables and it throws an error. i have pasted both below. Please provide help: var q = from a in db.GetTable() where a.model_id=id select a; throws an error: cannot convert implicitly to type int to bool Why is it throwing this error...Please help best regards

      haseeb

      V Offline
      V Offline
      vishalg_gupta
      wrote on last edited by
      #2

      you have to use a.model_id== id rather than a.model_id=id Vishal Gupta http://openreferals.com/Profiles/Profile.aspx?AccountID=14[^]

      H 1 Reply Last reply
      0
      • V vishalg_gupta

        you have to use a.model_id== id rather than a.model_id=id Vishal Gupta http://openreferals.com/Profiles/Profile.aspx?AccountID=14[^]

        H Offline
        H Offline
        haseeb_saeed
        wrote on last edited by
        #3

        thanx it worked

        haseeb

        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