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. prblem in where clause

prblem in where clause

Scheduled Pinned Locked Moved LINQ
databasequestioncsharplinq
3 Posts 3 Posters 3 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.
  • Z Offline
    Z Offline
    zeeShan anSari
    wrote on last edited by
    #1

    hi, like SQL query : select * from table where n between 0 and 10 how can i convert above query into LINQ ???

    J B 2 Replies Last reply
    0
    • Z zeeShan anSari

      hi, like SQL query : select * from table where n between 0 and 10 how can i convert above query into LINQ ???

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Assume N is some integer column,

      var results = from element in table
      where element.N >= 0 && element <= 10
      select element;

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Upon this disciple I'll build my new religion? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      1 Reply Last reply
      0
      • Z zeeShan anSari

        hi, like SQL query : select * from table where n between 0 and 10 how can i convert above query into LINQ ???

        B Offline
        B Offline
        balaji t
        wrote on last edited by
        #3

        hi , u can use between directly it will work like var fetch = from a in table where a.N between 0 and 10 select a;

        T.Balaji

        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