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

  • Home
  • SEARCH
  • 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 323377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:01:32+00:00 2026-05-12T09:01:32+00:00

When working with Windows Form controls and LINQ is there a Best Option for

  • 0

When working with Windows Form controls and LINQ is there a “Best Option” for how your Buisiness Layer returns the Data?

Right now I am returning DataTables so that I can then set the DataSource to the returned DataTable. Is there a better option? Why?

public class BLLMatrix
{
    public static DataTable GetMaintItems(int iCat)
    {
        IQueryable<tblCaseNotesMaintItem> tItems = DALMatrix.GetCNTable();
        return
            (tItems.Where(item => item.CategoryID == iCat & item.IsActive).OrderBy(item => item.OrderID).Select(
                item => new { item.ItemID, item.ItemDescription })).CopyLinqToDataTable();
    }

internal static class DALMatrix
{
    internal static MatrixDataContext MatrixDataContext = new MatrixDataContext();

    internal static Table<tblCaseNotesMaintItem> GetCNTable()
    {
        return MatrixDataContext.GetTable<tblCaseNotesMaintItem>();
    }

I found this similar question –> Separating concerns with Linq To SQL and DTO's

  • 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-12T09:01:32+00:00Added an answer on May 12, 2026 at 9:01 am

    Personally, I prefer Data Transfer Objects, but DataSets work in a pinch.

    Basically, the idea is that if you are working with Data Transfer Objects (which have no logic, and represent the model that you are looking to work with on the client), that is an abstraction that can live on regardless of changes on the front or back end. It’s typically a good idea.

    DataSets are useful, but their lack of compile-time safety (not in the case of strongly-typed DataSets though) because of numeric/string-based field access can pose a problem.

    Typically, there is also a large amount of overhead in serializing DataSets over a wire compared to a Data Transfer Object.

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

Sidebar

Related Questions

I am working with Windows form application. In that I retrieve the data from
i'm working on c# windows form application. I'd like to know if there is
I am working on a windows form application. How do i use the find
Where can I find the option to switch between the Windows Working Set in
Here's what I am working with: Part of my project is a windows form
This is a follow-up to All controls on a form are invisible , now
I'm using Visual Studio 2005 for a project I'm working on right now. I've
I'm working on a .Net Windows application. All the controls arrange fine, but when
Occasionally working in Windows Vista the O.S. will desaturate the screen, rendering all colors
i'm working on windows mobile app (c#, .net 2.0). i would like to make

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.