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 to SQL filter by logged in user in web forms

Linq to SQL filter by logged in user in web forms

Scheduled Pinned Locked Moved LINQ
databasecsharpasp-netlinqquestion
5 Posts 2 Posters 7 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.
  • D Offline
    D Offline
    David C Hobbyist
    wrote on last edited by
    #1

    Hi I am struggling with this linq query:

    var query = (from b in db.Builders where b.UserID==Login.User.Identity select b).ToList();

    The compiler yells at me. :( What am I missing? Thank You in advance.

    Frazzle the name say's it all

    W 1 Reply Last reply
    0
    • D David C Hobbyist

      Hi I am struggling with this linq query:

      var query = (from b in db.Builders where b.UserID==Login.User.Identity select b).ToList();

      The compiler yells at me. :( What am I missing? Thank You in advance.

      Frazzle the name say's it all

      W Offline
      W Offline
      Wayne Gaylard
      wrote on last edited by
      #2

      What exactly is the compiler yelling ?

      When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

      D 1 Reply Last reply
      0
      • W Wayne Gaylard

        What exactly is the compiler yelling ?

        When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

        D Offline
        D Offline
        David C Hobbyist
        wrote on last edited by
        #3

        I fixed it now I know to use the HttpContext. I wish to thank You for answering My post. :)

        Frazzle the name say's it all

        D 1 Reply Last reply
        0
        • D David C Hobbyist

          I fixed it now I know to use the HttpContext. I wish to thank You for answering My post. :)

          Frazzle the name say's it all

          D Offline
          D Offline
          David C Hobbyist
          wrote on last edited by
          #4

          Why was this Down voted? Am I doing this wrong? Is there a better way? I am a noob and would like to learn so please tell Me if there is a better way. Thanks in advance

          Frazzle the name say's it all

          W 1 Reply Last reply
          0
          • D David C Hobbyist

            Why was this Down voted? Am I doing this wrong? Is there a better way? I am a noob and would like to learn so please tell Me if there is a better way. Thanks in advance

            Frazzle the name say's it all

            W Offline
            W Offline
            Wayne Gaylard
            wrote on last edited by
            #5

            Guess it was a nonsense univoter. Fixed it as what you did was the right thing. If you find the answer yourself, then definitely post the solution, as other people may run into the same problem, and your solution may save someone else a few hours. :laugh:

            When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman

            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