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. The Lounge
  3. Linq + SQLMetal = Cool...

Linq + SQLMetal = Cool...

Scheduled Pinned Locked Moved The Lounge
csharpdatabasevisual-studiosql-serverlinq
56 Posts 24 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.
  • C Offline
    C Offline
    code frog 0
    wrote on last edited by
    #1

    So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

    I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

    P C R J R 14 Replies Last reply
    0
    • C code frog 0

      So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

      C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

      I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

      P Offline
      P Offline
      PIEBALDconsult
      wrote on last edited by
      #2

      And no control of the generated SQL. Accessors for tables you don't need (I suspect). Will it do joins? I write SQL so I know what it's doing and only as much as I need. However, I've been listening to Saint Lennon today, so "Whatever gets you through the night".

      C T 2 Replies Last reply
      0
      • P PIEBALDconsult

        And no control of the generated SQL. Accessors for tables you don't need (I suspect). Will it do joins? I write SQL so I know what it's doing and only as much as I need. However, I've been listening to Saint Lennon today, so "Whatever gets you through the night".

        C Offline
        C Offline
        code frog 0
        wrote on last edited by
        #3

        I didn't keep all the generated code. I went in and cut out all the stuff I won't use. I paired about 60% of the mass out of the class. Now it's tight and lean and I've seen all the code too. Just because it hands you a blimp doesn't mean you have to keep it that way. As the documentation suggests it's meant to be a base that you then customize or extend to meet your own needs. Regardless... !SOLD!:rose: {Edit}:thumbsup: Honestly, you should check it out and look at the resulting code. It's not bad. It's strongly typed, field length is enforced and it's structured in a logical way that's usable, easy to modify/update and it will seriously save you a lot of time doing the heavy lifting for you. What it gives you can be changed in any way you see fit. I inherit it all into another class where I do some stuff to the values before they are passed and it's so easy to do. {/Edit}:thumbsup:

        T H D 3 Replies Last reply
        0
        • C code frog 0

          So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

          C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

          I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

          C Offline
          C Offline
          code frog 0
          wrote on last edited by
          #4

          http://www.simple-talk.com/dotnet/.net-tools/exploring-linq,-sqlmetal-and-sqltac/[^] I'd write one for here but this guy did a great job. I might pare it down to something simpler. This bit from Microsoft was nifty too: http://msdn.microsoft.com/en-us/library/bb386987.aspx[^] Now you have all you need. Go and sin no more. :laugh:

          1 Reply Last reply
          0
          • C code frog 0

            So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

            C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

            I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

            R Offline
            R Offline
            Rama Krishna Vavilala
            wrote on last edited by
            #5

            Initial contact is always good.:)

            1 Reply Last reply
            0
            • C code frog 0

              So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

              C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

              I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

              J Offline
              J Offline
              JimmyRopes
              wrote on last edited by
              #6

              The only problem I have with LINQ is it came out in ASP.NET 3.5 and my Windows customers are still on ASP.NET 2.0. :sigh: Some day I will get to use it but unfortunately not right now.

              Simply Elegant Designs JimmyRopes Designs
              Think inside the box! ProActive Secure Systems
              I'm on-line therefore I am. JimmyRopes

              B 1 Reply Last reply
              0
              • C code frog 0

                So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

                C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

                I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

                R Offline
                R Offline
                Rocky Moore
                wrote on last edited by
                #7

                You do not have to go to SQLMetal, just add an LINQ to SQL Class to your project (you can have multiples too) and it will open up the designer. Switch to Server Explorer (View/Server Explorer), connect to the database and drag the tables you want onto the design surface. You can add relationships as you will and rename the objects it creates if you have a need. You can also drag a stored procedure over the the design seruver and it will create a method in the object class to call it with its parameters. Slick stuff! The classes it generates are all partial class types so you can add a new file to your project and extended those object classes such as display translations, business logic, etc. Really handy! Of course, this is just LINQ to SQL, LINQ itself works great for other objects and XML. It is a great general data query langauge that spans all data that are objects regardless of where you get the data. One word of caution though, in the beginning you need to watch carefully what is being sent to the server and when. With its lazy loading of objects, a simple query and walking through the data can generate hundreds, thousands or even tens of thousands of queries without you noticing. You have to take control on what is loaded and when. This is a step you already have to take care of manually in the old methods of data access, and for some new to LINQ to SQL, they think all that is automatic as they do not see it. We still have that responsiblity even though we do not notice it at first.

                Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                C H O 4 Replies Last reply
                0
                • C code frog 0

                  I didn't keep all the generated code. I went in and cut out all the stuff I won't use. I paired about 60% of the mass out of the class. Now it's tight and lean and I've seen all the code too. Just because it hands you a blimp doesn't mean you have to keep it that way. As the documentation suggests it's meant to be a base that you then customize or extend to meet your own needs. Regardless... !SOLD!:rose: {Edit}:thumbsup: Honestly, you should check it out and look at the resulting code. It's not bad. It's strongly typed, field length is enforced and it's structured in a logical way that's usable, easy to modify/update and it will seriously save you a lot of time doing the heavy lifting for you. What it gives you can be changed in any way you see fit. I inherit it all into another class where I do some stuff to the values before they are passed and it's so easy to do. {/Edit}:thumbsup:

                  T Offline
                  T Offline
                  Todd Smith
                  wrote on last edited by
                  #8

                  A lot of people throw the Repository [^] pattern on top of the LinqToSQL bits.

                  Todd Smith

                  1 Reply Last reply
                  0
                  • R Rocky Moore

                    You do not have to go to SQLMetal, just add an LINQ to SQL Class to your project (you can have multiples too) and it will open up the designer. Switch to Server Explorer (View/Server Explorer), connect to the database and drag the tables you want onto the design surface. You can add relationships as you will and rename the objects it creates if you have a need. You can also drag a stored procedure over the the design seruver and it will create a method in the object class to call it with its parameters. Slick stuff! The classes it generates are all partial class types so you can add a new file to your project and extended those object classes such as display translations, business logic, etc. Really handy! Of course, this is just LINQ to SQL, LINQ itself works great for other objects and XML. It is a great general data query langauge that spans all data that are objects regardless of where you get the data. One word of caution though, in the beginning you need to watch carefully what is being sent to the server and when. With its lazy loading of objects, a simple query and walking through the data can generate hundreds, thousands or even tens of thousands of queries without you noticing. You have to take control on what is loaded and when. This is a step you already have to take care of manually in the old methods of data access, and for some new to LINQ to SQL, they think all that is automatic as they do not see it. We still have that responsiblity even though we do not notice it at first.

                    Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                    C Offline
                    C Offline
                    code frog 0
                    wrote on last edited by
                    #9

                    So are you saying load it, use it and dispose it? That what you mean?

                    R 1 Reply Last reply
                    0
                    • R Rocky Moore

                      You do not have to go to SQLMetal, just add an LINQ to SQL Class to your project (you can have multiples too) and it will open up the designer. Switch to Server Explorer (View/Server Explorer), connect to the database and drag the tables you want onto the design surface. You can add relationships as you will and rename the objects it creates if you have a need. You can also drag a stored procedure over the the design seruver and it will create a method in the object class to call it with its parameters. Slick stuff! The classes it generates are all partial class types so you can add a new file to your project and extended those object classes such as display translations, business logic, etc. Really handy! Of course, this is just LINQ to SQL, LINQ itself works great for other objects and XML. It is a great general data query langauge that spans all data that are objects regardless of where you get the data. One word of caution though, in the beginning you need to watch carefully what is being sent to the server and when. With its lazy loading of objects, a simple query and walking through the data can generate hundreds, thousands or even tens of thousands of queries without you noticing. You have to take control on what is loaded and when. This is a step you already have to take care of manually in the old methods of data access, and for some new to LINQ to SQL, they think all that is automatic as they do not see it. We still have that responsiblity even though we do not notice it at first.

                      Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                      C Offline
                      C Offline
                      code frog 0
                      wrote on last edited by
                      #10

                      Totally AWESOME tips. I had no idea.

                      1 Reply Last reply
                      0
                      • C code frog 0

                        So are you saying load it, use it and dispose it? That what you mean?

                        R Offline
                        R Offline
                        Rocky Moore
                        wrote on last edited by
                        #11

                        Here was an issue I ran into with LINQ 2 SQL back with the Orca betas (which applies today): http://reflectedthought.com/TheCoder/archive/0001/01/01/Dark_Side_of_LINQ_2_SQL.aspx[^] And a little whining about another thing I wished they would have improved in LINQ 2 SQL, disconnected data without having to reread the data before updating it: http://reflectedthought.com/TheCoder/archive/0001/01/01/LINQ_Disconnected_Attach_no_Change_tracking_fix.aspx[^] Other than that, I like it. I have not looked much into LINQ 2 EF yet, but I am sure I will in the future. Right now though, I still use LINQ 2 SQL for my projects.

                        Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                        D 1 Reply Last reply
                        0
                        • R Rocky Moore

                          You do not have to go to SQLMetal, just add an LINQ to SQL Class to your project (you can have multiples too) and it will open up the designer. Switch to Server Explorer (View/Server Explorer), connect to the database and drag the tables you want onto the design surface. You can add relationships as you will and rename the objects it creates if you have a need. You can also drag a stored procedure over the the design seruver and it will create a method in the object class to call it with its parameters. Slick stuff! The classes it generates are all partial class types so you can add a new file to your project and extended those object classes such as display translations, business logic, etc. Really handy! Of course, this is just LINQ to SQL, LINQ itself works great for other objects and XML. It is a great general data query langauge that spans all data that are objects regardless of where you get the data. One word of caution though, in the beginning you need to watch carefully what is being sent to the server and when. With its lazy loading of objects, a simple query and walking through the data can generate hundreds, thousands or even tens of thousands of queries without you noticing. You have to take control on what is loaded and when. This is a step you already have to take care of manually in the old methods of data access, and for some new to LINQ to SQL, they think all that is automatic as they do not see it. We still have that responsiblity even though we do not notice it at first.

                          Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                          H Offline
                          H Offline
                          Henry Minute
                          wrote on last edited by
                          #12

                          Rocky Moore wrote:

                          just add an LINQ to SQL Class to your project

                          Where does one get a LINQ to SQL Class, in order to add it to a project. I only have VS2008 Standard. Is it only in the higher versions?

                          Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                          R 1 Reply Last reply
                          0
                          • C code frog 0

                            So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

                            C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

                            I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

                            H Offline
                            H Offline
                            Henry Minute
                            wrote on last edited by
                            #13

                            You are absolutely correct. This is waaay cool. Why do they hide this stuff?

                            Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                            R 1 Reply Last reply
                            0
                            • H Henry Minute

                              Rocky Moore wrote:

                              just add an LINQ to SQL Class to your project

                              Where does one get a LINQ to SQL Class, in order to add it to a project. I only have VS2008 Standard. Is it only in the higher versions?

                              Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                              R Offline
                              R Offline
                              Rocky Moore
                              wrote on last edited by
                              #14

                              When you select "Add New Item" within your project, it should be listed as "LINQ to SQL Classes".

                              Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                              H 2 Replies Last reply
                              0
                              • H Henry Minute

                                You are absolutely correct. This is waaay cool. Why do they hide this stuff?

                                Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                                R Offline
                                R Offline
                                Rocky Moore
                                wrote on last edited by
                                #15

                                :laugh:

                                Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                                1 Reply Last reply
                                0
                                • C code frog 0

                                  So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

                                  C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

                                  I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

                                  M Offline
                                  M Offline
                                  Mycroft Holmes
                                  wrote on last edited by
                                  #16

                                  Now I thought every developer who builds DB centric apps has built one of these, I am always astounded by the comercial code generators that actually survive. The one I use was first built in the mid 90's has been rewritten unmpteen times and does precicely what I want it to do, which is about 85-90% of the SQL code, including the stored procs. How do you guys survive not knowing whats under the hood?

                                  Never underestimate the power of human stupidity RAH

                                  C 1 Reply Last reply
                                  0
                                  • R Rocky Moore

                                    When you select "Add New Item" within your project, it should be listed as "LINQ to SQL Classes".

                                    Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                                    H Offline
                                    H Offline
                                    Henry Minute
                                    wrote on last edited by
                                    #17

                                    Nah. Not there. Must be exclusive to you rich guys.

                                    Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                                    1 Reply Last reply
                                    0
                                    • R Rocky Moore

                                      When you select "Add New Item" within your project, it should be listed as "LINQ to SQL Classes".

                                      Rocky <>< Recent Blog Post: ViewState and SEO – Move it! Thinking about Silverlight? www.SilverlightCity.com

                                      H Offline
                                      H Offline
                                      Henry Minute
                                      wrote on last edited by
                                      #18

                                      Please ignore my previous post. I had looked there before posting it but had forgotten that the Solution I was working on was targeting .NET 2.0. Doh! When I tried it with a .NET 3.5 Solution, it worked a treat. Excellent tip.

                                      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”

                                      L 1 Reply Last reply
                                      0
                                      • C code frog 0

                                        So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

                                        C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

                                        I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

                                        M Offline
                                        M Offline
                                        Marc Clifton
                                        wrote on last edited by
                                        #19

                                        And then there's this shameless plug for my latest article.[^] :~ Marc

                                        Available for consulting and full time employment. Contact me. Interacx

                                        1 Reply Last reply
                                        0
                                        • C code frog 0

                                          So here I am totally bogged down in reluctance to write more data access code and stored procedures. I hate it. It's tedious and bothersome. So... I google C# code generation SQL server and out pops this Linq result that talks about SQLMetal. Not having a clue at all what I'm looking at I bite. I open up the VS 2008 command prompt and type in:

                                          C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>sqlmetal /server:{server} /database:{db} /namespace:{new namespace} /code:{ClassName}.cs /language:csharp

                                          I hit enter and think this won't work. What do you know... Out pops a huge monolithic class that has all of the stuff required to Create/Insert/Update/Delete every table in the DB all VIA Linq. {Scratches Head} How the heck do I use this? Turns out a quick Google search and *BOOM* it's out of the park. No inline SQL, no stored procedures and no boredom. It's all done. I just invoke the class, instance my table populate the fields and then it's time to "Smile and Waive" as I call Submit(). I'm now a Linq convert. I will never go back. :cool:

                                          T Offline
                                          T Offline
                                          Tad McClellan
                                          wrote on last edited by
                                          #20

                                          I'm working on a linq project now. Trust me, the time you save by having MS do your data access code seem very small compared to the time you spend screaming at your IDE when something doesn't work and you have no idea as to why or what is wrong. I hate programming against a black box.

                                          TadMcClellan.Com

                                          D 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