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. Quick Poll

Quick Poll

Scheduled Pinned Locked Moved The Lounge
csharpdatabaselinqhelpquestion
35 Posts 21 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.
  • K Kevin Marois

    How many of you are still using Linq-To-SQL versus Entity Framework?

    In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

    S Offline
    S Offline
    Stepan Hakobyan
    wrote on last edited by
    #18

    Neither. Using Dapper or SQLCommand, Reader.

    1 Reply Last reply
    0
    • K Kevin Marois

      How many of you are still using Linq-To-SQL versus Entity Framework?

      In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

      Sander RosselS Offline
      Sander RosselS Offline
      Sander Rossel
      wrote on last edited by
      #19

      Isn't LINQ To SQL ancient history? :~ I'm using the latest versions of EF myself. Code first and migrations for automatic deployment.

      Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

      A 1 Reply Last reply
      0
      • P PIEBALDconsult

        Never neither. I just use straight ADO.net for access to whatever database system I need to connect to. If I understand correctly, those connect only to SQL Server. Using ADO.net allows an application to connect to multiple database systems, even allowing the user to specify which at run time if the application is written that way.

        Sander RosselS Offline
        Sander RosselS Offline
        Sander Rossel
        wrote on last edited by
        #20

        PIEBALDconsult wrote:

        If I understand correctly, those connect only to SQL Server.

        You understand incorrectly then. EF uses ADO.NET under the hood and also supports SQLite, MySQL, PostgreSQL, Azure Cosmos DB, Firebird, Oracle...

        PIEBALDconsult wrote:

        Using ADO.net allows an application to connect to multiple database systems, even allowing the user to specify which at run time if the application is written that way.

        How often is that a requirement? :~

        Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

        P 1 Reply Last reply
        0
        • K Kevin Marois

          How many of you are still using Linq-To-SQL versus Entity Framework?

          In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

          D Offline
          D Offline
          darktrick544
          wrote on last edited by
          #21

          Never used either, I don't mind writing the code myself.

          1 Reply Last reply
          0
          • K Kevin Marois

            How many of you are still using Linq-To-SQL versus Entity Framework?

            In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

            W Offline
            W Offline
            WPerkins
            wrote on last edited by
            #22

            Linq-To-SQL

            1 Reply Last reply
            0
            • K Kevin Marois

              How many of you are still using Linq-To-SQL versus Entity Framework?

              In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

              K Offline
              K Offline
              kmoorevs
              wrote on last edited by
              #23

              Kevin Marois wrote:

              Linq-To-SQL versus Entity Framework

              Neither. It's usually sqlclient unless I have to target non-sql server, then it's ado.net. I use datareaders or adapters to fill datasets/datatables. CRUD statements are all hand-rolled.

              "Go forth into the source" - Neal Morse "Hope is contagious"

              1 Reply Last reply
              0
              • Sander RosselS Sander Rossel

                PIEBALDconsult wrote:

                If I understand correctly, those connect only to SQL Server.

                You understand incorrectly then. EF uses ADO.NET under the hood and also supports SQLite, MySQL, PostgreSQL, Azure Cosmos DB, Firebird, Oracle...

                PIEBALDconsult wrote:

                Using ADO.net allows an application to connect to multiple database systems, even allowing the user to specify which at run time if the application is written that way.

                How often is that a requirement? :~

                Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

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

                More often for me than for others probably.

                Sander RosselS 1 Reply Last reply
                0
                • K Kevin Marois

                  How many of you are still using Linq-To-SQL versus Entity Framework?

                  In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

                  V Offline
                  V Offline
                  vbproapps
                  wrote on last edited by
                  #25

                  I do not use either for Database data, Entity Framework has always had bugs and a lot of overhead that is not necessary in the name of convenience. LINQ is actually awesome with arrays and datsets but not for database query functions. For MS SQL Db SqlConnector SqlCommand SqlAdapter are best in my opinion. For all others, ODBCConnector ODBC Command and ODBCDataAdapter. MySQL would use MySqlData.DLL data connectors and for Oracle use ODP.net. You get the picture right!

                  1 Reply Last reply
                  0
                  • K Kevin Marois

                    How many of you are still using Linq-To-SQL versus Entity Framework?

                    In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

                    A Offline
                    A Offline
                    Andreas Mertens
                    wrote on last edited by
                    #26

                    First off, I try to decouple the data processing from the main code, so that the application is not exposed to the actual query engine used. I tend to use EF as it can get me going quickly. But if there are bottlenecks or other issues I can move to another framework, or go straight to ADO.Net. Optimize where and when necessary. I've just published (with help) a fairly big open-source project on Github, which scans AzDo repos and reports on all kinds of tidbits - things like what version of .Net being used, libraries, NuGet and npm packages, etc. Useful to then determine which apps should be updated, for example if you are using a version of .Net no longer getting security patches. Sorry, rambling a bit. My point is I am considering switching some of this from SQL Server to a non-SQL backend. Easy to manage with all the DB code decoupled.

                    1 Reply Last reply
                    0
                    • Sander RosselS Sander Rossel

                      Isn't LINQ To SQL ancient history? :~ I'm using the latest versions of EF myself. Code first and migrations for automatic deployment.

                      Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                      A Offline
                      A Offline
                      Andreas Mertens
                      wrote on last edited by
                      #27

                      I never did get the hang of Migrations, always seemed to foul things up. Much prefer creating a DB project and code it directly there. Then again, I grew up using SQL Server and just got used to coding it directly.

                      Sander RosselS 1 Reply Last reply
                      0
                      • A Andreas Mertens

                        I never did get the hang of Migrations, always seemed to foul things up. Much prefer creating a DB project and code it directly there. Then again, I grew up using SQL Server and just got used to coding it directly.

                        Sander RosselS Offline
                        Sander RosselS Offline
                        Sander Rossel
                        wrote on last edited by
                        #28

                        I did SQL Server for years before switching to code-first and Migrations. Don't want to go back though. All my "SQL" is C# now, and by extension strongly-typed, in source control and automatically deployed. It takes some getting used to and there are some gotcha's, but for me, the pros far outweigh the cons. Even when I have an existing database, I code it like it was code-first.

                        Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                        1 Reply Last reply
                        0
                        • P PIEBALDconsult

                          More often for me than for others probably.

                          Sander RosselS Offline
                          Sander RosselS Offline
                          Sander Rossel
                          wrote on last edited by
                          #29

                          Well, still possible using EF.

                          Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                          P 1 Reply Last reply
                          0
                          • Sander RosselS Sander Rossel

                            Well, still possible using EF.

                            Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

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

                            Don't care.

                            Sander RosselS 1 Reply Last reply
                            0
                            • P PIEBALDconsult

                              Don't care.

                              Sander RosselS Offline
                              Sander RosselS Offline
                              Sander Rossel
                              wrote on last edited by
                              #31

                              Imagine you'd learn something new.

                              Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript

                              1 Reply Last reply
                              0
                              • K Kevin Marois

                                How many of you are still using Linq-To-SQL versus Entity Framework?

                                In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

                                J Offline
                                J Offline
                                jschell
                                wrote on last edited by
                                #32

                                Kevin Marois wrote:

                                Linq-To-SQL

                                Certainly I do not want to use it. I learned this when I started SQL profiling and found that linq, with no warning at all, will not necessarily convert to SQL. Instead it can pull data in the application and then process it there. This can lead to a single linq expression ignoring the filter clauses entirely and pulling the entire table into the application. Not hypothetical by the way, I have encountered exactly that. I have also seen it do something similar with linq that should have produced a single SQL join. Instead it did two database queries and then correlated the two in the application. In another case it ended up doing a while loop, again from a single linq statement, which resulted in 200+ database calls. My expectation then is that unless the statement is very simple that I will have to profile every linq statement (and variation.)

                                1 Reply Last reply
                                0
                                • K Kevin Marois

                                  How many of you are still using Linq-To-SQL versus Entity Framework?

                                  In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

                                  G Offline
                                  G Offline
                                  Gary R Wheeler
                                  wrote on last edited by
                                  #33

                                  My app uses Linq-to-SQL, but the data base stuff is just fluff for the customer.

                                  Software Zen: delete this;

                                  1 Reply Last reply
                                  0
                                  • K Kevin Marois

                                    How many of you are still using Linq-To-SQL versus Entity Framework?

                                    In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

                                    T Offline
                                    T Offline
                                    TNCaver
                                    wrote on last edited by
                                    #34

                                    None of the above. I use Microsoft.Data.Sql/SqlClient and System.Data.Odbc and convert data tables to POCOs via XmlSerializer or JsonConvert, although I've used Dapper in both of my Blazor projects.

                                    There are no solutions, only trade-offs.
                                       - Thomas Sowell

                                    A day can really slip by when you're deliberately avoiding what you're supposed to do.
                                       - Calvin (Bill Watterson, Calvin & Hobbes)

                                    1 Reply Last reply
                                    0
                                    • K Kevin Marois

                                      How many of you are still using Linq-To-SQL versus Entity Framework?

                                      In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.

                                      J Offline
                                      J Offline
                                      James Curran
                                      wrote on last edited by
                                      #35

                                      Starting about 7 years ago, I'd start every project using EF, and then after a while (growing from two hours to two weeks), I'd become so frustrated with EF's inability to do something that was available in Linq2Sql in V1.0, that I switch back L2S. On my last project, it's been 2 years, and I haven't reached that point yet. So, basically, it only took 7 (8?) releases of EF to match the capabilities that L2S had out of the gate.

                                      Truth, James

                                      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