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 779949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:00:15+00:00 2026-05-14T20:00:15+00:00

For a small/medium sized project I’m trying to figure out what is the ‘ideal’

  • 0

For a small/medium sized project I’m trying to figure out what is the ‘ideal’ way to have a domain layer and data access layer. My opinions on coupling tend to be more towards the view that the domain models should not be tightly coupled with the database layer, in other words the data access layer shouldn’t actually know anything about the domain objects.

I’ve been looking at Linq-to-sql and it wants to use its own models that it creates, and so it ends up VERY tightly coupled. Whilst I love the way you use linq-to-sql in code I really don’t like the way it wants to make its own domain objects.

What are some alternatives that I should consider? I tried use NHibernate but I did not like the way I had to use to query and get different objects. I honestly love the syntax and way you use linq, I just don’t want it to be so tightly coupled to domain objects.

  • 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-14T20:00:16+00:00Added an answer on May 14, 2026 at 8:00 pm

    If you don’t want your domain to be tightly coupled to your database, then your choices are pretty much:

    1. NHibernate
    2. Entity Framework

    Linq 2 Sql as you’ve discovered generates code from your database layer, so that’s out of the question. Same goes for Subsonic and LLBLGen Pro (I believe, correct me if I’m wrong). Entity Framework used to fall into this boat as well, but version 4 has shipped with “code first” support so it’s definitely an option.

    Both NHibernate and Entity Framework support LINQ queries, although Entity Framework’s LINQ support is supposedly superior to that of NHibernate’s. I agree that HQL and Criteria queries are not nearly as elegant as LINQ, but I have a feeling NHibernate’s LINQ support will be vastly improved come version 3.0.

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

Sidebar

Related Questions

I have a small to medium sized project to work on and I wanted
I am starting a little side project which consists of building a small-medium sized,
I have a small- to medium-size project that I am doing for my software
I have a small to medium project that is in C++/CLI. I really hate
First, I only have experience building small-medium sized websites with php so forgive me
I'm starting a small/medium-sized python project, likely in Test Driven Development. My backgrounds are
I have a web app that I provide to small to medium-sized businesses as
I'm trying to secure a small-medium sized MMO i've written in c# and we
I need to develop a small-medium sized desktop GUI application, preferably with Python as
If I have a table like this: CREATE TABLE sizes ( name ENUM('small', 'medium',

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.