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. Changing table name at run time!!

Changing table name at run time!!

Scheduled Pinned Locked Moved LINQ
databasecsharplinqcomtools
4 Posts 2 Posters 2 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.
  • S Offline
    S Offline
    Syed Mehroz Alam
    wrote on last edited by
    #1

    Hi folks, The generated linq-to-sql classes store the table name as an attribute; is there anyway I can make them dynamic? I want to use the same classes but for a different table with exactly the same schema. Any luck here :confused: Thanks, Syed Mehroz Alam

    My Articles

    P 1 Reply Last reply
    0
    • S Syed Mehroz Alam

      Hi folks, The generated linq-to-sql classes store the table name as an attribute; is there anyway I can make them dynamic? I want to use the same classes but for a different table with exactly the same schema. Any luck here :confused: Thanks, Syed Mehroz Alam

      My Articles

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Yup, although you have to do a fair bit of work yourself. If you take a look at the stuff that Rick Strahl of WestWind.com has done with regards to Linq and BLL, then you can find out how to do it.

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      S 1 Reply Last reply
      0
      • P Pete OHanlon

        Yup, although you have to do a fair bit of work yourself. If you take a look at the stuff that Rick Strahl of WestWind.com has done with regards to Linq and BLL, then you can find out how to do it.

        Deja View - the feeling that you've seen this post before.

        My blog | My articles

        S Offline
        S Offline
        Syed Mehroz Alam
        wrote on last edited by
        #3

        Thanks for the reply Pete. Let me search his huge blog.

        My Articles

        P 1 Reply Last reply
        0
        • S Syed Mehroz Alam

          Thanks for the reply Pete. Let me search his huge blog.

          My Articles

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          Try here[^].

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          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