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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:52:50+00:00 2026-05-28T18:52:50+00:00

I am an experienced .NET developer who has primarily been working with webforms. I

  • 0

I am an experienced .NET developer who has primarily been working with webforms. I am familiar with MVC but have not used it commercially yet. I am currently conducting some self-education in this area and am somewhat confused by the differences in opinion on the subject of architecture, let me prefix this question with the understanding that there is not a right or wrong answer but I am simply seeking what is an elegant solution.

I will start out by saying that I am not using the entity framework or any sort of ORM – I would like to directly implement my own business objects and data access code (using ADO, SPROCS etc) to ensure they are optimal, this is a personal preference. This is where I am struggling to find consistent information as it appears most information relates to the use of LINQ to SQL or the Entity Framework.

MY application has been structured with the following projects:

  • Web (MVC 3 Web application)
  • Models (class library)

There are only two projects because I am having issues decoupling things; this is the root of my question.
My model class library contains…

  • classic business objects with fields and properties
  • A repository class for each business object which contains data access code (ADO.NET straight forward SqlDataReaders etc)
  • An interface for each repository class

The issue I have is the dependency between all these layers. It does not feel right at all!

1.The business objects should contain methods that implement the business logic, so aside from the fields and properties there are methods to implement any required logic?

2.The repository classes execute data access code but know about the business objects, this again does not feel right, the data access code should sit in its own class library and know nothing about the objects?

3.The controllers (in the web layer) leverage the repository interfaces but why? They should not contain business logic, the ‘model’ or business object should? The controllers should certainly not contain business logic so again this is not right. I don’t want business logic in repositories as they are hitting the database.

I am struggling to find an elegant architecture for the application, just a basic outline of how to implement my own objects, my own data access code and ensure the application is loosely coupled. Can anyone offer me any guidance please?

  • 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-28T18:52:51+00:00Added an answer on May 28, 2026 at 6:52 pm

    I would suggest a few changes to your solution structure.

    For example, the projects could be structured as follows:-

    Core Library

    This would be simple POCO’s that represent your domain data and interfaces to any services. There is no business logic here. Just simple properties.

    eg.

    public class User
    {
    public int UserId { get; set; }
    public string Name { get; set; }
    }

    - Core
          \Entities <-- Poco's
          \Services <-- Interfaces for services
    

    Services

    This would be where you contain your business logic. How does a user validate? How do we calculate when a Order should be auto-archived or whatever? Generally, I don’t do any database stuff in here.

    Repository

    This is where you do your basic database stuff. You said you’re not using L2S or EF, etc. No probs. I would seriously seriously look at using a Micro-ORM instead, like Dapper or Massive.

    Tests

    You’re doing unit and integration tests, right? i recommend xUnit or nUnit for the testing framework.

    Web Application

    This is the MVC3 application. I would recommend using StructureMap for your Dependency Injection. (You are using an IoC/DI, right?)

    You might think at first -> that’s SOOO many projects, right? well, it’s easy to split this into TWO projects only.

    1. Web Application
    2. Test project

    and the Core Library, Services, Repository all exist in the Web Application project as folders.

    Try and not over-engineer the Visual Studio solution. Most people think they need lots of projects and crap loads of abstraction .. because that’s what they think everyone else is doing and it’s the right thing. Well, that train of thought is very very early 2000’s .. and in 2012 – lots of shiz has changed since then.

    Try using DI/IoJ, NuGet for downloading these libraries into your solution, Micro-OR/M’s for data access and a Testing project.

    A few projects to check out, re: how things are layed out :

    1. JabbR.net
    2. RavenOverflow
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm an experienced developer who has been working with .Net for the last 5
I am an experienced .NET applications developer. All of my development experience has been
I'm an ASP.NET developer who has used Microsoft SQL Server for all my database
I'm a .NET web developer who has just been asked to produce a small
I'm an experienced asp.net developer who has begun developing in php, specifically in wordpress.
I'm mostly an ASP.NET developer, so I'm not very familiar with either J2EE or
I am not the only programmer, but I'm the only .NET developer, everyone else
I’m an experienced VB.NET developer, who wants to start with C#. I’m searching for
I am an experienced Java developer who is trying to learn web development with
I'm looking for feedback from .Net developers who have experience with Aldon as a

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.