Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 302143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:04:13+00:00 2026-05-12T07:04:13+00:00

I am starting a new Winforms application, and I’ve always used traditional ADO.NET methods

  • 0

I am starting a new Winforms application, and I’ve always used traditional ADO.NET methods in my DAL (…yes, hardcoding!)

I have used Linq on many ocassions previously, but more for adhoc queries, so I have some experience with it and I loved how easy it was to write querying code. What I would like to perhaps do is replace my existing DAL with pure LINQ queries. I know that they may be areas of concerns with this, which is why I need your help.

If I had to do things like how I always had done in the past, I would structure my app like:

  • [AppName].ClientUI –> desktop client Presentaion layer
  • [AppName].WebUI –> web Presentation layer
  • [AppName].DAL –> ADO.NET Data access layer
  • [AppName].BLL –> Business logic layer (validation, extra calcs, + manager classes)
  • [AppName].BE –> Business Entities containing business objects and collection classes

To be honest, I’ve used this always in web apps and had never done an n-layered Winforms app before.

If I want to replace my old DAL methods with LINQ ones, what challenges am I in store for.

Finally, is it even recommended to use LINQ in a multi-layered app? Sometimes I think that using the old ADO.NET methods is still better…more work, but better. I mean – and correct me if Im wrong – at the core of all these new technologies (that are meant to make our work as developers better) are they not all still making use of traditional ADO.NET???

Hope someone can shed some strong light on this! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:04:14+00:00Added an answer on May 12, 2026 at 7:04 am

    For a straight forward winforms client app that connects directly to the database, Linq is a good replacement for ADO.NET, there are very few gotchas that you will come up against. Use a tool like SQLMetal (Or the designer that’s built in with VS2008) to generate your Linq data objects and database connection classes. If you want use the generated objects as your “BE” objects you can just copy this stuff and move it into what ever assembly you want (if you want to separate the assemblies). Or alternatively you can just provide separate “Business entities” and a translation layer that copies data from the BEs to the Linq generated objects and back again.

    The one gotcha that I have come across with Linq a few times is that it doesn’t have very good support for disconnected architectures. For example if you wanted to have your DAL on a server and have all your client apps connect to it, you will hit on problems if you just let your linq objects be transfered across the server.

    If you do choose to have separate business entities (or have a disconnected architecture) you will find you have to carefully manage disconnecting the Linq objects from the data context, and then reattaching them when you are ready to save/update. It’s worth doing some prototyping in this area first to make sure you understand how it works.

    The other thing that often trips people up is that linq queries are not executed immediately against the database, they are only executed as the data is needed. Watch out for this, as it can catch you out if you aren’t expecting it (and it’s hard to spot when debugging because when you look at your linq query in the debugger it will execute to get the data).

    It’s also worth considering the Entity framework as an alternative of linq2sql (you can still to linq2EF queries). The EF is a more complete ORM and has better support for mapping related tables to multiple objects, but still suffers from poor support for disconnected apps. The EF in .net 4.0 is supposed to have better support for disconnected architectures.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im starting a new project in .net and i want to used andromda framework
I'm starting a new ASP.Net application from scratch. What should I use to encode
I am starting a new web application in PHP and this time around I
We are starting a new SOA project with a lot of shared .net assemblies.
I'm starting a new database application and I wonder if it would be better
I have a WinForms application that uses XNA to animate 3D models in a
I have a C# WinForms application. This exception is thrown within the static void
Working with a fairly large VB.Net back office winforms application. 1 million+ LOC. Big
We are starting a new SilverLight 4 Business Application project and are looking for
Starting a new project and would like to use one of the MVC framworks.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.