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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:43:20+00:00 2026-05-14T02:43:20+00:00

In general, I don’t like to keep code (BaseClasses or DataAccess Code) in the

  • 0

In general, I don’t like to keep code (BaseClasses or DataAccess Code) in the App_Code directory of an ASP.NET Site. I’ll usually pull this stuff out into a MySite.BusinessLogic & MySite.DataAccess DLL’s respectively.

I’m wondering should I be doing the same for ASP.NET MVC.

Would it be better to Organise the solution something along the lines of

  • MySite.Common – DLL – (Basic Functionality built on .NET System Dlls)
  • MySite.DAL – DLL – (DataAccessLayer & DBML Files)
  • MySite.Models – DLL – (MVC Models e.g. Repository Classes)
  • MySite.Controllers – DLL (MVC Controllers which use Models)
  • MySite – ASP.NET MVC Site.

Or am I missing something… presumably, I’ll lose some of the nice (Add View, Go To Controller, context menu items that have been added)

  • 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-14T02:43:20+00:00Added an answer on May 14, 2026 at 2:43 am

    I have only done a few projects using MVC but using your naming structure we did the following:

    • MySite.Common – DLL – (Basic Functionality built on .NET System Dlls)
    • MySite.DAL – DLL – (DataAccessLayer &
      DBML Files and Repostiory Models)
    • MySite.Models – included this as part
      of the MVC web app and only had
      models specific to views that did not
      always map one to one for each
      repository model.
    • MySite.Controllers – included as part
      of MVC app but could link to a Business Layer
    • MySite – MVC app.

    So in the end had the following projects in my MVC solution:

    • MVC Web App – contains controllers, view models to map DAL data to.
    • Common – functionality that could be used in other apps
    • DAL – contained all the data access related data including the wrapper classes
    • BL – optional depending if it required a lot of business specific logic
    • Tests

    EDIT: My DALs alway output wrapped objects (if using Linq2Sql then I map the autogenerated classes to my classes in the DAL directly). The only classes that exist in the MVC app are containers that represent the viwes and mainly used to pass data to the views.

    If your mobile app is using similar views I wouldn’t try and re-use the same classes from your MVC app views. There is always slight differences that you will need to manage and you should be able to just use the DAL classes to map to your mobile views which follows the pattern of keeping the view classes localized to the app.

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

Sidebar

Related Questions

Don't be scared of the extensive code. The problem is general. I just provided
General Info: ASP.NET MVC app using ADO.NET Entity Framework SQL Server 2005 I have
I need to ask a general question. I don't have the code in front
What are some general tips to make sure I don't leak memory in C++
general question is i like to build logger class that writes to single log
I don't know if this is a browser general issue or if it is
I really don't know much about attributes in general in C#, I've seen them
I'm don't have a lot of knowledge of MySql (or SQL in general) so
I'm fairly new to JQuery and Javascript in general. I don't think I'm trying
I don't have IE9 to mess around with this, so it's a general question.

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.