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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:30:11+00:00 2026-05-13T08:30:11+00:00

Here’s the architecture of my app: I have a data access layer in a

  • 0

Here’s the architecture of my app:

I have a data access layer in a seperate assembly, with a class containing methods such as List_XYZ, Insert_XYZ, Update_XYZ etc. All methods return or use objects from an object model I’ve created, which also resides in the data access layer assembly.

Inside my mvc app, I’ve created views, controllers and models. Inside the models I’ve stuck the logic to call the data access layer and populate themselves from the data access layer object model classes as well as logic to create the data access layer classes and pass them to the data access layer for inserts updates:

|-----MVC Application---------||-----------Data Access Layer------|
View -> Controller -> Model  <-->  Object <--> Data Access Layer <--> Database

Now, because some of the views are getting a little more complex, I need to get a list of looks for drop downs as well as get the details for the object I’m editing or viewing, and I am adding logic for caching, I’m wondering if the model is really the spot for this data. I thought about moving the communication between the MVC model and Data access layer to the controller instead, but I like having a nice lean controller and model, so am thinking about a 4th entity. I know there’s been lots of discussion around where to put business rules/database calls should it be in the controller or model, but haven’t seen much discussion around introducing a 4th entity. Bad idea?

  • 1 1 Answer
  • 2 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-13T08:30:11+00:00Added an answer on May 13, 2026 at 8:30 am

    4th entity meaning 4th layer? For lookup tables, we have a class which contains all lookups. It’s then pretty trivial to use ASP.NET Caching to cache each call. For example, this lookup class might contain calls such as Fetch_States(), Fetch_Statuses(), Fetch_Colors, etc. For example:

    IEnumerable<RefTable_State> Fetch_States()
    {
        if HttpContext.Current.Cache["States"] == null
        {
            HttpContext.Current.Cache.Insert("States", DAL.Get_States());
        }
        return (IEnumerable<RefTable_State>)HttpContext.Current.Cache["States"];
    }
    

    We simplify it a bit via a base cache class, but that’s the general idea.

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

Sidebar

Related Questions

Here is my simplified data structure: Object1.h template <class T> class Object1 { private:
Here's the view: @if (stream.StreamSourceId == 1) { <img class=source src=@Url.Content(~/Public/assets/images/own3dlogo.png) alt= /> }
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
Here is an example: I have the generic type called Account. I wish to
Here is the problem that I am trying to solve. I have two folders
Here is my class: public class A{ private void doIt(int[] X, int[] Y){ //change
Here's the basic setup: I have a thin bar at the top of a
Here is my problem : I have a post controller with the action create.
Here is the problem I'm trying to solve for my game. I have this
Here are some facts about my app followed by a question My app has

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.